#2002 Cannot log in to the MySQL server (SOLVED- RiggsFolly is awesome!)
Posted by: quasius (---.hsd1.wa.comcast.net)
Date: November 27, 2013 09:20AM

I've installed WampServer and have gotten it to "orange." At first it was red, but I solved that by shutting down Skype. I can now see the WampServer page and localhost, but when I try to login at localhost/phpmyadmin, I get an error: "#2002 Cannot log in to the MySQL server"

Thanks for any help!



Answers to the "first post questions":

Version of Operating system? Windows 7 Home Premium 64-bit
Version of Wamp Server installed? 2.4
Version of Apache you are running? 2.4.4
Version of MySQL you are running? 5.6.12
Version of PHP you are running? 5.4.12

What colour is your WampManager icon? ( the in the system tray ) Orange
It could be Green, Orange or Red

Do you have a HOSTS file? [c:\windows\system32\drivers\etc\hosts]
Paste any entries relating to the domain localhost and also any relating to your Virtual Hosts if you have any.

127.0.0.1 localhost
127.0.0.1 localhost



Edited 1 time(s). Last edit at 11/27/2013 08:29PM by quasius.

Options: ReplyQuote
Re: #2002 Cannot log in to the MySQL server
Posted by: RiggsFolly (---.as13285.net)
Date: November 27, 2013 10:54AM

Morning quasius

Ok, if the wampmanager icon is Orange and you can get to the WampServer homepage then the MySQL Service has not started.

Using the Wampmanager menus take a look at the mysql error log.

left click wampmanager -> MySQL -> MySQL log

If that does not show any [error] messages then also have a look at the 'Windows Event Viewer' in the 'Application' section for messages from MySQL.

The normal problem is a rogue 'my.ini' or 'my.cnf' file on your system. Search for these 2 files in the C;\windows folder, if you find any then delete them.

DO NOT DELETE THE my.ini FILE FREOM ANYWHERE IN THE C;\WAMP folder structure.




How to Configure SKYPE so it does not require port 80 or 443

Run SKYPE
then using the menus do this:

Tools -> Options -> Advanced -> Connection

Un-Check the checkbox next to 'Use port 80 and 443 as alternatives for incomming connections'

Now restart SKYPE for these changes to take effect.


If you are running Windows 8 SKYPE comes as an app and this cannot ( as yet ) be configured in this way.
However if you uninstall the SKYPE app and install SKYPE in the old way, you can reconfigure it, and it works just as well.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: #2002 Cannot log in to the MySQL server
Posted by: quasius (---.hsd1.wa.comcast.net)
Date: November 27, 2013 12:11PM

left click wampmanager -> MySQL -> MySQL log was empty. (The file didn't even exist.)

But Windows Event Viewer does turn up some MySQL warnings / errors. Specifically, in order:


WARNING: TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

ERROR: Can't find messagefile 'c:\WAMPServer\bin\mysql\mysql5.6.12\share\errmsg.sys'

WARNING: Can't create test file c:\WAMPServer\bin\mysql\mysql5.6.12\data\QUASIUS-LAPTOP.lower-test

WARNING: Can't create test file c:\WAMPServer\bin\mysql\mysql5.6.12\data\QUASIUS-LAPTOP.lower-test

ERROR: Aborting


The issue here is that WampServer is not installed to c:\WAMPServer\... I'd installed it there originally then read it was better to leave it at the default c:\wamp\... So I uninstalled it and re-installed to the default, but it seems to be "remembering" the old installation location from before- at least for MySQL purposes. Where is the installation directory stored? I guess that's what I need to change.



Thanks for you help!

Options: ReplyQuote
Re: #2002 Cannot log in to the MySQL server
Posted by: RiggsFolly (---.as13285.net)
Date: November 27, 2013 12:50PM

Did you change the my.ini file on your original install? And then copy that my.ini into the new install?

That sound like what you may have done.

You will just have to go through the ini file and do a Sanity check on all the parameters.


Also add these 2 parameters to your new my.ini

# reduce mem size for MYISAM usage
table_definition_cache = 600
#5.5 to 5.6 changes
explicit_defaults_for_timestamp

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: #2002 Cannot log in to the MySQL server
Posted by: quasius (---.hsd1.wa.comcast.net)
Date: November 27, 2013 08:29PM

Thanks! That worked. I think I know what happened now. I did not manually preserve the my.ini file from the original installation, but there were some files left after the uninstall. Since I just renamed that directory and installed there, it probably left the old file.

Also,

# reduce mem size for MYISAM usage
table_definition_cache = 600
#5.5 to 5.6 changes
explicit_defaults_for_timestamp

were not necessary to get it working, but I left them in anyway.


Thanks for the awesome help!

Options: ReplyQuote


Sorry, only registered users may post in this forum.