I have two MySQL installations on two different PCs not connected to each other. I made some changes in the my.ini file of PC 1 and tried using this file on PC 2, but MySQL service fails to start. Why the copied My.INI not working on my PC when both installations were configured same and the instance names also similar?

  • 1
    does it give any error messages in the error log? – Derek Downey Aug 6 '11 at 18:26
  • No it doesn't give error. It just displays: "Could not start NySQL service". – RPK Aug 8 '11 at 5:04
  • Three(3) Questions : 1) What is the version of MySQL on each machine ? 2) Was MySQL installed the exact same way on each machine ? Is the default path of MySQL C:\Program Files\MySQL\MySQL Version 5.x\ ??? – RolandoMySQLDBA Aug 8 '11 at 21:31
  • @Rolando: YES to all your questions. Version is 5.5. – RPK Aug 11 '11 at 6:32
  • 1
    Have you checked that the my.ini config'ed paths for basedir/datadir actually exist on the non-working machine? And that the [mysqld] port= config is not already in use by another application on that machine (netstat -a from a windows command prompt will list the ports in use)? You can also put the two .ini files on the same PC and do a "windiff file1.ini file2.ini" to make sure the only differences are exactly what you think they should be. Try reducing the differences as much as possible and retrying startup to see if one of them is causing the fault. – GregW Sep 14 '11 at 15:17

First, let's make sure MySQL evens runs properly apart from the service.

Open a DOS Window Session and run these commands

C:\> cd "C:\Program Files\MySQL\MySQL 5.5\bin"
C:\Program Files\MySQL\MySQL 5.5\bin> start mysqld

When you launch mysqld like this, mysqld expects my.ini to be in the parent directory, which is C:\Program Files\MySQL\MySQL 5.5. Using start in DOS will open another DOS Window as a background task. If any error messages appear in that window and that forked DOS Session quickly disappears from the screen, check the Task Manager to see if mysqld is running. If it is, you should be able to log into mysql. If mysqld is not in the Task Manager, launch it as a foreground task like this:

C:\Program Files\MySQL\MySQL 5.5\bin> mysqld

If the DOS prompt appears after some error messages, then mysqld failed. If error messages come up and the DOS prompt does not appear, mysqld is up.

If the settings you configured in my.ini on PC 2 is not in SHOW VARIABLES; then mysqld cannot see the my.ini. To reiterate, mysqld expects my.ini to be in the parent directory.


Compare your my.ini files side-by-side, there must be some setting that makes it impossible to start your server, maybe some InnoDB setting. Check your system's event log under Windows System Logs > System (wording may be a bit different, I don't have English windows). There you will have a more detailed information on service fail reason.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.