The strangest thing happened to a MySQL server (running Windows Server 2003) I set up today. MySQL would install with no problem, work all day with no problem, then fail after a reboot. The MySQL service simply wouldn’t start, producing this error message:

First I checked the my.ini file and saw no obvious problems […]

This article was posted by Independent Software, a website and database application development company based in Maputo, Mozambique. Our website offers regular write-ups on technical and design issues, ranging from details at code level to 3D Studio Max rendering. Read more about Independent Software's philosophy, or get in touch with Independent Software.

The strangest thing happened to a MySQL server (running Windows Server 2003) I set up today. MySQL would install with no problem, work all day with no problem, then fail after a reboot. The MySQL service simply wouldn’t start, producing this error message:

First I checked the my.ini file and saw no obvious problems (it was also the default my.ini file produced by the installer). Since the service wouldn’t start, I created a new one that made sure it was reading the right .ini file:

… but to no avail, as the same error occurred. Eventually I gave up and reinstalled MySQL. But it still didn’t work!

I did learn two interesting things:

  • When trying to delete a service from Windows, make sure that the Services Manager is not open. The deleted service only gets truly deleted when the Services Manager is closed, which may leave you wondering why it’s taking so long (“This service is marked for deletion”).
  • When you need to reinstall MySQL, in order to really start fresh, you need to do three things:
    1. Uninstall MySQL (Add/remove programs, etc.)
    2. Delete the MySQL program directory
    3. Delete the MySQL data directory (under Documents and Settings, Application Data, etc.)

When I did a truly “fresh” install of MySQL, it actually worked again. But only till the next reboot. I found out when there was a power outage later during the day. MySQL wouldn’t start, and manually starting the service would produce, again, the error 1067.

This time I had a look at the MySQL log file, which lives in the data directory (called server001.err in my case). I found this:

Ah, more information on the error. It turns out that Windows error 87 is ERROR_INVALID_PARAMETER; in other words: “The parameter is incorrect” (see here). Not particularly helpful, but it gets you something to Google for.

There weren’t too many Google results, but after I while I found this. It seems that the error is related to either the disk driver or the formatting of the disk (neither of which I could easily change on a remote server). But the bug report did include a workaround. Add this to my.ini:

And it works!

Did this article help you out? Please help us find more time to write useful guides & articles like this by donating a buck or two. It'll keep us coffee-fueled. Thanks!


  1. MySQL error 1067 on Windows 8 (error 87) | Kris's Box
  2. Windows 8.1无法正常启动MySQL服务出现错误1067的解决方法 | ViewStock


29 29 Responses to “MySQL error 1067 – Windows error 87 – ERROR_INVALID_PARAMETER”
  1. gadgetfann says:

    This saved me in Windows 8 – I had installed MySQL 6 times before finding your solution, which solved the problem I was having. Thank you!

  2. KrisGielen says:

    Many thanks for this. I had the same issue and could not figure out what was going on, until I found your page.
    Just like gadgetfarm, I am running Windows 8.

  3. Pedro says:

    This was the solution that worked for me as well. I am also running windows 8 and wampserver. I was having the issue of the mysql service unable to start after rebooting. After doing this, the icon turns green and everything works. Thank you so much for posting this. After 3 days for searching and trying everything else, this definitely made my day!

  4. fabio says:

    thanks for this info, like others i was having problems on a damn w8 install
    thank you !!!

  5. MartinodF says:

    Run into this while installing MySQL 5.6 on W8.1 64bit. Fix works perfectly, thanks!

  6. JC says:

    The innodb_flush_method=normal is what fixed it for me… didn’t need to reinstall anything..
    I did stop installation process when attempting to start the service, and just added that line in the my.ini file
    so more likely didn’t need to stop the installation process so it can finish regularly.

  7. FrancescoAnz says:

    Thank you! I had the same trouble on an Asus tablet model T100 come with windows 8.1 and SSD. Now it works!!!

  8. Andy Mc says:

    Great, got it working thanks but needed an extra line. This is what I added to my.cnf…

    innodb_flush_method = normal
    innodb_force_recovery = 1

  9. Thx aLot says:

    It Works !!!!

  10. Jay-r says:

    Thanks man you’re awesome

  11. Firenze LU says:

    The line works for my W8.1 tablet. You’re great!

  12. pablonowakowski says:

    thanks works great on transformer t100! I thought sth is wrong with my xampp…

  13. roadworrier says:

    thank you!!!!

  14. Diana Cristina Aguilar says:

    Hola yo cambie la ruta de mi base de datos y me sale el error 2003 y regreso la carpeta data al lugar de origen y funciona perfecto.
    Esa linea que ustedes dicen donde se coloca para ver si me funciona.
    Ya me estoy volviendo loca. he modificado el archivo my.ini
    Para que me funcione debo dejar todo como se instala.
    que hago

  15. Nico says:

    Genial, miles de gracias
    innodb_flush_method=normal is the solution
    3 days lost with this problem, and you done the solution
    thank you very much

  16. angela says:

    Hi ..
    I installed my-SQL at my tablet which has window 8.
    I have a same problem.
    After I added

    innodb_flush_method = normal
    innodb_force_recovery = 1

    It seemed work but When the tablet was discharged than it happened again.
    What should I do?

  17. Kenneth Richards says:

    Thanks a ton for this information. Had the exact same issue on Windows 8.1 after moving my Xampp install of Mysql to a new memory card.

  18. Eghaghara Ese says:

    You are good works for me

  19. Hritik Vijay says:

    Thanks man !
    It helped a lot!
    Keep on the good work 🙂

  20. wira buana says:


  21. LUCA says:

    Thanks man,
    you have literally saved my life. I spent so many days to find a solution :-S

  22. Pete says:

    Yes it works!!!!
    Resolved this issue on a solid state HDD machine.
    There is an issue with how these DB files are stored on such hardware.

    Thanks alot!!!!

  23. z3d0 says:

    Thanks a lot, solved my mysql error 1067 on windows 10!!!

  24. Dmitry says:

    God save you, man.

  25. angua says:

    Bless you people, solved my problem with mysql on ASUS T100 as well

  26. Marek says:

    Thanks, half a day spent on fixing it. You saved my day!

Leave a Reply

Your email address will not be published. Required fields are marked *