PhpMyAdmin - unable to connect - invalid settings - since I added a root password with a lock

I run XAMPP, after a few days I set a password for the root password via phpmyadmin I can not access phpMyAdmin from now on

I followed the link for help, but everything seems fine there (in config.inc.php). I even tried to fully implement xampp by restarting windows and reinstalling xampp, but still pointing to localhost / phpmyadmin, I get the following error:

MySQL said: Cannot connect: invalid settings. 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. 

I also tried resetting the root password via mysqld.bat, as indicated in the mysql help system, but to no avail

Please, help! Here is a screenshot describing the situation: enter image description here

+44
mysql root phpmyadmin
Aug 14 '09 at 7:39
source share
11 answers

Change to the phpMyAdmin directory inside the XAMPP installation folder. There will be a file called config.inc.php. Inside this file, find the following line:

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

You must make sure that this field contains your mysql user password (the one you set).

+88
Aug 14 '09 at 7:46
source share

PHPMYADMIN - Unable to connect: invalid settings.

I also had a similar problem, but now I have found a fix.

For the Wamp server:

In: C: \ wamp \ apps \ phpmyadminVERSION \ config.inc.php

 $cfg['Servers'][$i]['AllowNoPasswordRoot'] = true; $cfg['Servers'][$i]['AllowNoPasswordRoot'] = false; 

For xampp server:

due to xampp server there were following settings.

C: \ xampp \ phpMyAdmin \ config.inc.php

 $cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['password'] = ''; // which is default setting in xampp server $cfg['Servers'][$i]['password'] = 'your password';//type your password you have changed 
+17
Mar 15 2018-11-11T00:
source share

I had a similar problem that could not access phpmyadmin on the test server after changing the root password. I tried everything mentioned above, including tips from other forums, using all sorts of options for configuration files. Then I remembered that Google Chrome has some problems with the test server. The reason is that Chrome has a security feature to prevent the local hard drive from accessing a remote website - unfortunately, this can cause problems in a test environment, because the server is a local hard drive. When I tried to enter phpmyadmin with Internet Explorer, it worked fine. I tried several tests of Chrome v IE9 and Chrome did not work in any configuration with the root password set. I also tested Firefox, it also worked fine, the problem is only in Chrome. My advice: if you are on a test server, make sure that your configuration file has the correct settings as described above, but if the problem continues and you are using Chrome, try a different browser.

+9
Oct 11 '12 at 15:47
source share

Step 1: Go to

  http: //localhost/security/xamppsecurity.php 

Step 2: Set / change your password.

Step 3: Open C: \ xampp \ phpMyAdmin \ config.inc.php using the editor.

Step 4: Check the following lines:

 $cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['password'] = 'your_password'; // your_password = the password that you have set in Step 2. 

Step 5: Ensure that the following line is set to TRUE: $ cfg ['Servers'] [$ i] ['AllowNoPassword'] = true;

Step 6: Save the file, restart MySQL from the XAMPP control panel

Step 7: Log in to phpmyadmin with the root and your password.

Note. If the same error appears again, check the security page:

  http: //localhost/security/index.php 

It will say: The MySQL root admin user no longer has a password. SECURE Password entry PhpMyAdmin is enabled. SAFELY

Then reboot your system, the problem will be solved.

+8
Sep 24 '12 at 5:02
source share

Apply these changes in phpmyconfig / config.inc. Enter your username and password that you set:

 $cfg['Servers'][$i]['user'] = 'user'; $cfg['Servers'][$i]['password'] = 'password'; $cfg['Servers'][$i]['AllowNoPassword'] = false; 

This works for me.

+4
Nov 02
source share

I got the same problem after running the following command in mysql

UPDATE mysql.user SET Password = PASSWORD ('blablabla') WHERE User = 'root'; PRIVILEGES OF FLUSH;

What I've done:

open cmd

type

cd c: \ xampp \ mysql \ bin mysql.exe -u root --password

after that mysql will ask u

Enter password: blablabla

after youre in mysql, enter

UPDATE mysql.user SET Password = PASSWORD ('') WHERE User = 'root'; PRIVILEGES OF FLUSH;

Note: this time the password remains blank ...

make sure the following is set in your config.inc.php

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

after that i can see my phpmyadmin ...

+3
Aug 29 2018-12-12T00: 00Z
source share

I had a similar problem. The difference was that I was getting this error for only one database from all my databases. I deleted the password, restarted mysql many times and still worked on it :(

And when I cleared my browser’s cache, it just started working !!!

It really ruined my mind!

+2
Nov 02 '12 at 7:33
source share

I had the same problem using Windows XAMPP 1.7.4 - after setting the password for mysql, I could no longer access phpMyAdmin. I changed the password in config.inc.php from '' to the new mysql password and changed AllowNoPassword from true to false. I still could not enter.

However, I saw that there is also a config.inc.php.safe file, and when I also edited the password settings in the THAT file, I was subsequently able to enter phpMyAdmin.

+1
Jul 24 2018-11-11T00:
source share

I am also one of the nobs when I came across something like this. So ... I set the passwords using the security page of the command: / opt / lampp / lampp security Then I used the xyz password for all the passwords ... Then, when I go to the / site, it asks for basic authentication. But when I tried root // xyz, it does not allow me to log in. So, after some digging, it turned out that the xyz password was set for the user by default with the name "lampp". When I tried to log in using lampp // xyz, it worked like a charm.

The problem is that they made the assumption that everyone knows what to use lampp // rootpw as their oO name And ... this is the main auth for the directory! not pw for phpmyadmin or pw for mysql ...

0
Jul 18 '13 at 15:38
source share

1) Go to the Xampp root directory folder

For Ex: C: xampp / phpmyadmin / config.inc.php

2) In this, find the following:

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

3) Enter the password that you set.

Example: $cfg['servers'][$i]['password'] = '1234';

4) Then save it and restart the Xamp server.

0
Oct 13 '15 at 4:34
source share

This works for me:

C: \ XAMPP \ PHPMYADMIN \ config.inc.php

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

Edit: before you get this error, most likely from phpmyadmin-> Users you added a password for the root user . In my case, it was "secret", so the above primer works for me, BUT you will work on this:

 $cfg['Servers'][$i]['password'] = 'Enter the password for root you have added before you got this error'; 
0
Oct. 21 '15 at 6:51
source share



All Articles