I had the exact same problem but my situation was different (I use WAMP 3.1 i.c.w. Windows 10 64-bit). Thus, the solution was different. Read below how I solved it in my situation.
First, I checked the MySQL Log. Like this:
Second, I saw errors like this:
wampmysqld64: Table 'mysql.plugin' doesn't exist
2018-08-15T14:54:37.207560Z 0 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2018-08-15T14:54:37.211344Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2018-08-15T14:54:37.215551Z 0 [Warning] Failed to open optimizer cost constant tables
2018-08-15T14:54:37.216151Z 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
Third, after interpreting the errror log I navigated to the mysql data directory.
The location of that directory on my machine was: C:\wamp64\bin\mysql\mysql5.7.19\data
. This can be different on your machine. I noticed that some directories where missing. I didn't had a "mysql" directory, though it must be there in order to work.
Fourth, I copied the "mysql" directory from a different machine to C:\wamp64\bin\mysql\mysql5.7.19\data
, and restarted All Services through WAMP. That solved the problem.
1did you mistype here or in your config? should be "localhost" not "localhodst" – Endophage – 2011-08-11T04:49:26.470
whoops typo on my part. yeah it's localhost... but i did not mistype in the mysql thingy.... it is localhost... still same error – test – 2011-08-11T04:58:05.317
when i type
netstat
on cmd... i do not see port 3306 being used... even though it's allowed in my windows firewall.. i am using vista... 64-bit – test – 2011-08-11T04:59:42.010What happens when you try to run
mysqld
directly? – Dan Grossman – 2011-08-11T05:34:37.970How do I run
mysqld
? – test – 2011-08-11T06:08:24.493