Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL Says: Cannot connect: invalid settings

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?

like image 565
freerunner Avatar asked Nov 09 '14 06:11

freerunner


People also ask

Why MySQL is not working in xampp?

The good news is that, if this does happen, there are three methods you can use to troubleshoot the issue: Run XAMPP using administrator privileges. Restore your database backup. Change your MySQL port.

Why my phpMyAdmin is not working?

You may receive an error message stating that phpMyAdmin needs a PHP version within a specific range. This might happen if you're running an outdated version of PHP, or a new update is not compatible with your version of MAMP. In this case, you”ll need to change the PHP version of your MAMP application.

Why phpMyAdmin is not working in xampp?

To access phpMyAdmin from XAMPP you will need to make sure you have Apache and MySQL running in the XAMPP control panel by clicking the start buttons under the Actions column. If Apache and MySQL are green then all is well. Then you can click the “Admin” button in the MySQL row and that will launch phpMyAdmin.


2 Answers

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

  1. open terminal
  2. type command:

    sudo /etc/init.d/mysql stop
    
  3. type command:

    sudo  /opt/lampp/lampp restart
    
  4. open localhost in browser
like image 118
Rahul chak Avatar answered Oct 06 '22 09:10

Rahul chak


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

like image 23
Yagnesh Panchal Avatar answered Oct 06 '22 09:10

Yagnesh Panchal