Fixing MySQL Service Could Not Start, 1067 Errors

If you’ve unzipped mysql out to a folder and you set it up to run as a service, like so

C:\mysql5_x64\bin\mysqld-nt.exe --install-manual

You might try to launch the service from the Control Panel -> Administrative Tools -> Services Window. But if you’re getting the error message:

‘Could not start the MySQL service on Local Computer

Error 1067: The process terminated unexpectedly.’

Running from the command line:

C:\mysql5_x64\bin\mysqld-nt.exe --console

Should work fine. So what’s the problem? Well, you may be missing your my.ini file. Create the file (you can copy one of the defaults that come with it such as my-small.ini), and make the following changes by adding the basedir & datadir lines, so it looks something like this:

# The MySQL server
[mysqld]
###################################
basedir=C:/mysql5_x64
datadir=C:\mysql5_x64/data
###################################
port        = 3306
socket        = /tmp/mysql.sock

If you try to launch the service again, you should feel alot happier.

Some of the readers have put in some helpful comments, which I’ll include here

Take a look at your error log by looking in:

“C:\Documents and Settings\All Users.WINDOWS\Application Data\MySQL\”

Then click on the “MySQL Server X.X\” folder and then “data\”

Find the file [MY-DOMAIN-NAME].err and open it using notepad

Another possible cause of the 1067 error might be faulty my.ini settings.

So the general tip from me would be: Try to think of any reconfigurations you’ve done recently. That might be what’s causing this. —ChromaWoods

We were getting a 1067 error because (we think) we’d been unable to successfully complete a reinstall after mixing up the original root password [on the mysql server].

Our solution in the end was to _completely_ uninstall MySQL and reinstall. The tricky part is that the uninstall requires three steps:

1. Uninstall via Add/Remove Programs from the Control Panel.

2. Delete the Base directory — likely C:/Program Files/MySQL

3. Delete the Data directory — likely C:/Documents and Settings/All Users/Application Data/MySQL

Finding the Data directory may be a bit tricky, since the Application Data folder is hidden by default. If you change your Folder Options so you can view the Application Data folder and still cannot see it, type the path (from step 3) into Run from the Start Menu to open the folder.

Once you’ve uninstalled MySQL and deleted these two folders, you should be ready to start fresh!

Advertisements

34 thoughts on “Fixing MySQL Service Could Not Start, 1067 Errors”

  1. Hi,

    Thanks a lot, it really help me to start my work.
    I spend my entire day but I was unable to find solution, now I always remember that we have to set my.ini , in order to start mysql…

    Thanks again for saving my time.

  2. i have the same problem but its not solve my problem. after running the command “mysqld-nt.exe –console” this message appear

    C:\wamp\mysql\bin>mysqld-nt.exe –console
    InnoDB: Error: log file .\ib_logfile0 is of different size 0 10485760 bytes
    InnoDB: than specified in the .cnf file 0 5242880 bytes!
    081117 17:36:32 [ERROR] Can’t init databases
    081117 17:36:32 [ERROR] Aborting

    081117 17:36:32 [Note] mysqld-nt.exe: Shutdown complete

    please help, what should i do to make mysql service running?

  3. Another possible cause of the 1067 error might be faulty my.ini settings.

    For example, I’ve had encoding problems and figured I could just set “utf8” as Default collation on the “Advanced” tab in MySQL Administrator. Wrong! This produced the 1067 error but I was able to fix it using this list of valid collations:

    http://dev.mysql.com/doc/refman/5.1/en/charset-charsets.html

    In other words, I should’ve used utf8_general_ci

    So the general tip from me would be: Try to think of any reconfigurations you’ve done recently. That might be what’s causing this.

  4. Hi there —

    We were getting a 1067 error because (we think) we’d been unable to successfully complete a reinstall after mixing up the original root password.

    Our solution in the end was to _completely_ uninstall MySQL and reinstall. The tricky part is that the uninstall requires three steps:

    1. Uninstall via Add/Remove Programs from the Control Panel.

    2. Delete the Base directory — likely C:/Program Files/MySQL

    3. Delete the Data directory — likely C:/Documents and Settings/All Users/Application Data/MySQL

    Finding the Data directory may be a bit tricky, since the Application Data folder is hidden by default. If you change your Folder Options so you can view the Application Data folder and still cannot see it, type the path (from step 3) into Run from the Start Menu to open the folder.

    Once you’ve uninstalled MySQL and deleted these two folders, you should be ready to start fresh!

    Reinstalling may not have been the most expedient way to solve our own 1067 error, but since the uninstall itself wasn’t self-evident (at least to us who are new to MySQL), we wanted to share here.

    Thanks!

  5. I’ve ecountered the same problem just yesterday. The funny thing is that I’ve sucessfully installed and run mysql 5.1 on two computers using win xp with apache server and no problem at all. Then I decided to uninstall mysql 5.1 on one of them cause I just wanted to move the installation path to C:/mysql for easier access. But when I tried to configure mysql using wizard, then the error 1067 occured. I tried to repeat the installation and unistallation process many times but still the the service wouldn’t start. I even tried to remove the waste from registry. Could it, the error, just happen because of the uninstallation not clean enough, and there’s some changing configuration of the last mysql that still recorded on windows?

  6. In Windows 7 by default program data folder is hidden. select the folder option by controle panel -> folder option -> view -> enable show hidden files. now you can able to see the “programdata”. Using controle panel uninstall to delete the mysql and delete the entire folder Mysql under programdata. by doing this you are deleting the innodb file location. now youy install mysql-5.1.37-win32.msi one more, hope everything will be fine

  7. Thank you so much, Cyleft! You totally rock!!! I googled everything and spent hours following other people’s instructions to no avail! Your instructions did the trick. However, I did do one additional thing, which was I went to Start > Run > typed in regedit > went to HKEY_LOCAL_MACHINE > SYSTEM> CurrentControlSet > Services and deleted the MySQL registry key. After I finished deleting that, I pressed F3 and typed in MySQL to look for any entry with “MySQL” in the title (not inside the file, but just the title), which I killed. Then, I reinstalled MySQL, but this time, I chose Custom and reinstalled it in a different location just in case there was something leftover that was hidden from the previous install (you never know!).

    1. thanks too… my mysql also could not start and i’ve been searching for solution for last 4 days. I’ve tried everything: uninstall and reinstall, add the basedir and datadir but nothing happen. Then I change the innodb_buffer_pool_size=3G to innodb_buffer_pool_size=1G and still did not work. Lastly I add this two lines:
      socket = /tmp/mysql.sock
      bind-address = 127.0.0.1 and like miracle, it works. Thanks a lot.

  8. Hello.
    Today I am facing the same problem.
    I try to start MySQL service from “Microsoft Management Console” Services. So when I double-clicking “MySQL55” (the service’s name in my computer), it just drop me an “Error 1067: The process terminated unexpectedly” in front of my face.

    Instead of trying to change “My.ini” and insert a line like “basedir” and/or “datadir”, I am going to see what the error log says. In my case, the error log file sitting in “C:\Documents and Settings\All Users.WINDOWS\Application Data\MySQL\MySQL Server 5.5\data\[MYDOMAIN-NAME].err”. This file talk to me clearly a line:
    “InnoDB: VirtualAlloc(2175795200 bytes) failed; Windows error 87”

    So, what I need to solve the problem is just changing a single character on My.ini file :
    from “innodb_buffer_pool_size=2G” to “innodb_buffer_pool_size=1G”.
    and MySQL now becomes much more happy to start servicing in my server computer….

    Moral of the story is : take a look at your log files, firstly.

    Thank you.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s