0

I am having a lot of issues - #1045 Cannot log in to the MySQL server

I have just downloaded and installed MultiCraft on my servers. I used to use phpMyAdmin and it used to work perfect. Anyways, MultiCraft is creating the user correctly although when I am going to go and login it with the details that it has provided it does not work it brings this error up - #1045 Cannot log in to the MySQL server

Now, I started to dig around so I went into phpMyAdmin on the root account and I saw that the account has been created, and as the host it was % I changed it to localhost and it started working. Now, if I was to do this for every customer they would have to wait for me to do this and It would be a bit time consuming for them, why is phpMyAdmin not allowing people onto the server with % as the host.

Thank you

1
  • I'd say that MultiCraft is creating the MySQL user incorrectly if you have to change the user it creates. Not sure how to change how the MySQL user is made. Commented Feb 2, 2014 at 18:44

1 Answer 1

0

I don't know about MultiCraft but i've tested it in pure MySql.

To allow people to log into PhpMyAdmin using % as host :

Edit file /usr/share/phpmyadmin/config.inc.php :

Replace :

$cfg['Servers'][$i]['host'] = 'localhost'; 

By :

$cfg['Servers'][$i]['host'] = '192.168.0.41'; # IP Address of the MySql host 

Then try to log into phpMyAdmin.


If you have the following error :

#2003 - The server is not responding 

This is a SELinux issue. Run :

setsebool -P httpd_can_network_connect=1 

Now you should be able to connect.


Now, if you want to allow connexion to phpMyAdmin from any host in your network, and not only from the host that is running the MySql Server :

Edit file /etc/httpd/conf.d/phpmyadmin.conf

Replace :

<Directory "/usr/share/phpmyadmin"> Order Deny,Allow Deny from all Allow from 127.0.0.1 </Directory> 

By :

<Directory "/usr/share/phpmyadmin"> Order Deny,Allow Deny from all Allow from all </Directory> 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.