MySQL says: cannot connect: invalid settings

We use XAMPP in a shared environment on our local network. All projects had a mysql username and password by default. I recently tried changing the project username and password. And now I can not access phpmyadmin. It simply displays the following message:

phpMyAdmin tried to connect to the MySQL server and the server rejected the connection. You must check the host, username and password in your configuration and make sure that they match the information provided by the MySQL server administrator.

Now no one can access phpmyadmin. How can i solve this?

+7
source share
11 answers

you can simply solve this by editing the config.inc.php file from the phpmyadmin folder ..

This will work fine if you change the password for the update with the same username.

Find the line $cfg['Servers'][$i]['password'] =";

Just replace it with

$cfg['Servers'][$i]['password'] = ' ';

Please see here for more details.

+7
source

Error: -Connection for controluser, as defined in your configuration, failed.

solution: - due to the fact that two mysql servers are working on your ubuntu system, so get confusion, solve this problem, stop mysql servert first

  • open terminal
  • enter the command:

     sudo /etc/init.d/mysql stop 
  • enter the command:

     sudo /opt/lampp/lampp restart 
  • open localhost in browser
+5
source

Just add $cfg['Servers'][$i]['host']="127.0.0.1:3307"; if you change the port.

+4
source

There is a bat file 'resetroot.bat' located in the xammp folder of MySQL i.e.: 'C: \ xampp \ mysql'

Run the bat file and it will reset the phpadmin password. Then start the MySQL service in xammp and try calling phpmyadmin.

Hope this helps.

+1
source

In my case, it was just because I forgot to enable the MySQL service in the XAMPP control panel. * Facepalm *

+1
source

I also get the same error and finally found the answer with the first response of the above message. But this is wrong, because this error is subject to a password change, so all this needs to be done to solve this problem. the previous one looks like this:

 " $cfg['Servers'][$i]['password']='';" 

after i changed like:

 " $cfg['Servers'][$i]['password']='root'; " 

The actual reason for this when installing XAMMP is not a password there, but after that I added a password for security. But it did not update in config.inc.php , so we need to update it manually by following these steps.

+1
source

In my case, it seems that the mysql server crashed while it was a running state without any special thing. My web application has been connected to the db server and is perfect for a long time. I tried to open phpmyadmin and it started giving problems (same errors mentioned in question) when connecting to db. After 5 minutes, I found that my db crashed and did not start at all even after doing a lot of things.

0
source

uninstall xampp and reinstall it in the differnt folder. but before deleting, save the "htdocs" documents to another place and after installation will return ur data to a new folder "htdocs"

0
source

Delete all lines with $cfg['Servers'] and continue ONLY $cfg['Servers'][$i]['host']

0
source

Try to access phpmyadmin through "127.0.0.1:8080"

0
source

Start the Apache server first.

Then click config and open phpMyAdmin(config.inc.php)

You should initially have this expression in your config.inc.php

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

Change the IP address to 'localhost:' i.e. $cfg['Servers'][$i]['host'] = 'localhost:';

I did this and the problem is resolved for me. Hope it helps :)

0
source

Source: https://habr.com/ru/post/977934/


All Articles