phpMyAdmin: "Cannot connect: invalid settings" - proposed solutions failing
Posted by: Tosh (---.zone5.bethere.co.uk)
Date: July 02, 2010 01:20AM

I had a working WAMP installation which I used to make a small website a while back, but when I tried to use it again recently it didn't work. In that period I had a separate PHP installation, but apparently that's a big no-no so I've uninstalled and deleted it completely (including the php.ini file). I also wiped and reinstalled WAMP a few times, and tried using the password reset tool.

My wamp is not installed in a directory with spaces (it's just C:\wamp), and my phpMyAdmin "config.inc.php" file is set up to accept "root" with no password, as follows:

$cfg['Servers'][$i]['verbose'] = 'localhost';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['AllowNoPassword'] = true;

The full error is:

"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."

The wampserver home page says that mysql and msqli are both loaded. If I try to load a page that uses MySQL from my own website, I get this error:

"Fatal error: Call to undefined function mysql_connect()"

I tried reading through similar threads and trying all of the suggestions, hence all of the information that I have listed here, but nothing seems to be working. I would greatly appreciate any help you can give.

Thanks smiling smiley

Options: ReplyQuote
Re: phpMyAdmin: "Cannot connect: invalid settings" - proposed solutions failing
Posted by: yfastud (Moderator)
Date: July 02, 2010 03:02AM

did you try to search and delete any config files such httpd.conf, my.ini, php.ini outside wamp folder?

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: phpMyAdmin: "Cannot connect: invalid settings" - proposed solutions failing
Posted by: Tosh (---.zone5.bethere.co.uk)
Date: July 03, 2010 07:52PM

I searched my C drive for all three and got nothing outside of the wamp folder. Thanks for the suggestion though.

Options: ReplyQuote
Re: phpMyAdmin: "Cannot connect: invalid settings" - proposed solutions failing
Posted by: Tosh (---.zone5.bethere.co.uk)
Date: July 04, 2010 08:16PM

If the extra information helps, I tried uninstalling and deleting wamp completely, and tried xampp. I also tried an older version of wamp (I think it was somthing like WAMP5 1.7x). Both of these gave exactly the same error upon trying to get into phpMyAdmin.

I have also opened MySQL in the command line and checked that logging in with "root" and no password works fine. I would really appreciate any ideas, if anybody can think of something that I haven't tried. Thanks.

Options: ReplyQuote
Re: phpMyAdmin: "Cannot connect: invalid settings" - proposed solutions failing
Posted by: vidya (---.dhcp.or.charter.com)
Date: July 08, 2010 09:08PM

Yes, I was having the exact same problem, but I noticed an "Open New PhpMyAdmin" link at the bottom.

I clicked on that and voila! It asked for login codes. I typed 'root' for the username and no password.
It worked.

It's a kludge for sure, but hey! It works.

Options: ReplyQuote
Re: phpMyAdmin: "Cannot connect: invalid settings" - proposed solutions failing
Posted by: toumimi (---.50.80-79.rev.gaoland.net)
Date: July 08, 2010 11:31PM

Hi,

It is possible, as you are trying to connect with root, that you need to add this line in phpmyadmin conf file :

wamp/apps/phpmyadminxxxx/config.inc.php
$cfg['Servers'][$i]['AllowNoPasswordRoot'] = 'true';

Florian

WampServer Patch (Screenshots)
Topic EN : www.wampserver.com
Topic FR : www.wampserver.com

Options: ReplyQuote
Re: phpMyAdmin: "Cannot connect: invalid settings" - proposed solutions failing
Posted by: Tosh (---.zone5.bethere.co.uk)
Date: July 09, 2010 10:54PM

vidya Wrote:
-------------------------------------------------------
> Yes, I was having the exact same problem, but I
> noticed an "Open New PhpMyAdmin" link at the
> bottom.
>
> I clicked on that and voila! It asked for login
> codes. I typed 'root' for the username and no
> password.
> It worked.
>
> It's a kludge for sure, but hey! It works.


It isn't working. I can get to the login page by setting "auth_type" to cookie, and entering "root" and no password there doesn't work either. Oh well, thanks anyway.

toumimi Wrote:
-------------------------------------------------------
> Hi,
>
> It is possible, as you are trying to connect with
> root, that you need to add this line in phpmyadmin
> conf file :
>
> wamp/apps/phpmyadminxxxx/config.inc.php
> $cfg['Servers'][$i]['AllowNoPasswordRoot'] =
> 'true';

You had me excited for a second there, but it still won't work. Thanks for the suggestion though.

Is it possible that phpMyAdmin is working perfectly fine, but something is wrong with MySQL? I tried creating a database and the tables I need manually using the command line, but I still can't connect to it using my own php scripts. I am particularly suspicious of the mysql php extensions (called mysqli and mysql, i believe), but i don't know how to use this suspicion constructively...

Options: ReplyQuote
Re: phpMyAdmin: "Cannot connect: invalid settings" - proposed solutions failing
Posted by: yfastud (Moderator)
Date: July 10, 2010 03:22AM


Options: ReplyQuote
Re: phpMyAdmin: "Cannot connect: invalid settings" - proposed solutions failing
Posted by: Tosh (---.zone5.bethere.co.uk)
Date: July 10, 2010 07:47PM

I did the first step (ResetMySQL), but I can't do the second step because unfortunately the first step still doesn't give me access to phpMyAdmin sad smiley

Options: ReplyQuote
Re: phpMyAdmin: "Cannot connect: invalid settings" - proposed solutions failing
Posted by: yfastud (Moderator)
Date: July 10, 2010 07:53PM


Options: ReplyQuote
Re: phpMyAdmin: "Cannot connect: invalid settings" - proposed solutions failing
Posted by: Tosh (---.zone5.bethere.co.uk)
Date: July 10, 2010 09:11PM

Yes, I even tried searching for those three files: "my.ini" "my.cfn" and "my.conf". I found nothing outside of the wamp folder though.

Options: ReplyQuote


Sorry, only registered users may post in this forum.