We are using XAMPP in a shared environment in our local network. All the projects had the default mysql username and password. Recently I tried to change the user name and password of a project. And now I am not being able to access phpmyadmin. It just displays the following message:
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.
Now no one is able to access the phpmyadmin. How can I solve this?
For my case it seems the mysql server crashed, while it was it running state without any special thing happened. My web app was connected to the db server and was ideal for long time. I was trying to open the phpmyadmin and it started to give issues(same errors mentioned in the question) while connecting to db. After 5 mins I found my db crashed and not at all starting even after trying lot of things.
uninstall the xampp and reinstall it in differnt folder. but before uninstalling it please save the documents of 'htdocs' to the other location and after installing put ur data back to new "htdocs" folder
In my case it was just because I had forgotten to turn on the 'MySQL' service on the XAMPP control panel. *facepalm*
Remove all lines with
$cfg['Servers']
, and keep ONLY the$cfg['Servers'][$i]['host']
I am also getting the same error, and finally found the answer with help of first reply of above post. But that is wrong because this error prone due to changed password so all of need to do this to get resolve it. previous it look like:
after I changed like:
The actual reason behind this while installing the XAMMP there is no password but after the that I added password for security. But it did't get updated in
config.inc.php
so we need to update manually by following above steps.Error:-Connection for controluser as defined in your configuration failed.
solution:- because of in your ubuntu system two mysql server running so get confusion solve this problem stop mysql servert first
type command:
type command: