Php – MySQL service not starting on WAMP

apacheMySQLPHPwamp

I donwloaded the latest version of WAMP which is 3.0.6 and I am at my wits end with this. The Apache services works 100% but the MySQL service on WAMP refuses to start and I have tried several solutions found on stackoverflow. Here is what I have tried:

  • I tried changing the port from 3306 to 3307 (and others within the 330X range), and when I test the port, it just says Port 3307 is not found associated with TCP protocol. Even for the default 3306 port it says this

  • I tried checking the MySQL logs but it comes up as a blank document

  • I tried starting the wampmysqld64 service in Services.msc and it fails

  • I checked for any duplicate my.ini files on my system and there are none

  • I uninstalled XAMPP, but that didn't fix anything

  • I tried disabling my firewalls

  • I tried manually changing the port numbers in the my.ini file

  • I tried a tutorial on YouTube that used the MySQL console on WAMP but whenever I try that it asks for a password and closes after I try to proceed beyond that point

  • I tried uninstalling and reinstalling WAMP several times

  • I have restarted WAMP and my computer after each change I made

  • I saw a few resources said to delete certain files from mysql/data but I do not have a data folder in my mysql directory in wamp

  • I don't have any ib_logfiles or ibdata files to delete

  • I tried uninstalling and reinstalling the MySQL service

  • I can't delete anything from the mysql-bin.index file because it does not exist anywhere in my wamp folder

  • I tried using the option Use port other than 3306 and changing it from 3301 – 3309, none of them work

  • I tried running wampserver64 as an administrator

  • I tried installing WAMP as an administrator

  • I checked my Microsoft C/C++ Runtime Libraries and have all the required libraries

  • Lastly, a friend of mine downloaded the same version as me and has the exact same configurations as me but his WAMP works perfectly fine.

What else can I try to get the MySQL service to run on WAMP?

Best Answer

I had exactly the same issue and after trying a lot of possible solutions, I solved it by the following steps:

  1. Make a backup of MySQL data folder (C:\wamp64\bin\mysql\mysql5.7.24\data).
  2. Make a clean WAMP installation on another PC or Windows installation.
  3. Copy the following folders/files from the clean installation and paste it to the corrupt installation.
    • C:\wamp64\bin\mysql\mysql5.7.24\data\mysql
    • C:\wamp64\bin\mysql\mysql5.7.24\data\sys
    • C:\wamp64\bin\mysql\mysql5.7.24\data\auto.cnf
  4. Delete the following files from the installation where you have the problem:
    • **.err
    • **.pid
    • ib_logfile0
    • ib_logfile1

On completion of the above I also restarted WAMP services and it started working fine for me.

Hope this helps.

Related Topic