Home | Site Map | Cisco How ToNet How To | Wireless |Search | Forums | Services | Donations | Careers | About Us | Contact Us|

phpMyAdmin: server rejected the connection

Network Sharing , TCP/IP, Internet, Wireless, Exchange, IIS, ISA and Print

phpMyAdmin: server rejected the connection

Postby guest » Sat Jul 14, 2012 7:03 pm

I run XAMPP, a few days back i had set up a password for the root password through phpmyadmin I am not able to access phpMyAdmin ever since that moment

I followed help on this link but everything seems fine there (in config.inc.php). I even tried unistalling xampp fully, restarting windows and then 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 to reset root password through mysqld.bat as given on mysql's website help but to no avail
Tablet and Smartphone Setup Guide
http://www.quicksetupguide.com

Troubleshooting Vista Wireless
http://chicagotech.net/
guest
 
Posts: 9572
Joined: Mon Nov 27, 2006 1:10 pm

Re: phpMyAdmin: server rejected the connection

Postby guest » Sat Jul 14, 2012 7:03 pm

Go inside your phpMyAdmin directory inside XAMPP installation folder. There will be a file called config.inc.php. Inside that file, find this line:

$cfg['Servers'][$i]['password'] = ''; you must make sure that this field has your mysql root password (the one that you set).
Tablet and Smartphone Setup Guide
http://www.quicksetupguide.com

Troubleshooting Vista Wireless
http://chicagotech.net/
guest
 
Posts: 9572
Joined: Mon Nov 27, 2006 1:10 pm

Re: phpMyAdmin: server rejected the connection

Postby guest » Sat Jul 14, 2012 7:04 pm

I had this same problem using the Windows XAMPP 1.7.4 -- after setting a 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 couldn't log in.

However, I saw that there is also a config.inc.php.safe file, and when I also edited the password settings in THAT file I was subsequently able to log in to phpMyAdmin.
Tablet and Smartphone Setup Guide
http://www.quicksetupguide.com

Troubleshooting Vista Wireless
http://chicagotech.net/
guest
 
Posts: 9572
Joined: Mon Nov 27, 2006 1:10 pm

Re: phpMyAdmin: server rejected the connection

Postby guest » Sat Jul 14, 2012 7:04 pm

PHPMYADMIN - Cannot connect: invalid settings.

I also faced similar issue but now I found a fix.

For wamp server:

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

$cfg['Servers'][$i]['AllowNoPasswordRoot'] = true; $cfg['Servers'][$i]['AllowNoPasswordRoot'] = false; For xampp server:

because of xampp server had the 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
Tablet and Smartphone Setup Guide
http://www.quicksetupguide.com

Troubleshooting Vista Wireless
http://chicagotech.net/
guest
 
Posts: 9572
Joined: Mon Nov 27, 2006 1:10 pm

Re: phpMyAdmin: server rejected the connection

Postby guest » Sat Jul 14, 2012 7:05 pm

$cfg['Servers'][$i]['AllowNoPassword'] = false; this fixed my problem for xaamp. I could not login even after I changed the password for the password field.
Tablet and Smartphone Setup Guide
http://www.quicksetupguide.com

Troubleshooting Vista Wireless
http://chicagotech.net/
guest
 
Posts: 9572
Joined: Mon Nov 27, 2006 1:10 pm

Re: phpMyAdmin: server rejected the connection

Postby guest » Sat Jul 14, 2012 7:06 pm

Can you log in on the command prompt? (for instance: mysql -u root -p or even just mysql -u root)

Just to make sure you're aware, the root password for the mysql service and the root password for the device are going to be different. My hunch is that there's no password set on the 'root'@'localhost' MySQL account.

If one of the command line login methods above works, then run this in the mysql prompt and edit your question to include the output (remove the password hashes; we don't need to see them, we just need to know if they're there):

select User, Host, Password from mysql.user;
Tablet and Smartphone Setup Guide
http://www.quicksetupguide.com

Troubleshooting Vista Wireless
http://chicagotech.net/
guest
 
Posts: 9572
Joined: Mon Nov 27, 2006 1:10 pm

Re: phpMyAdmin: server rejected the connection

Postby chicagotech » Sat Jul 14, 2012 9:24 pm

Or you may want to reset mysql password by following this link: How to reset MySQL password in Windows - http://www.howtonetworking.com/others/mysql4.htm
Networking, Internet, Routing, VPN Troubleshooting on http://www.ChicagoTech.net
How to Setup Windows, Network, VPN & Remote Access on http://www.HowToNetworking.com
chicagotech
Site Admin
 
Posts: 6486
Joined: Mon Nov 27, 2006 1:24 pm
Location: Chicago USA


Return to Networking

Your Ad Here

Who is online

Users browsing this forum: No registered users and 3 guests