Configuring a MySQL 5.1 Instance on Windows 7 Professional x64 Fails

27,070

Solution 1

i had this problem after un-installing and re-installing. during the MSI install, when it asks for the root password - check to see if it's asking for 'old password' in addition to a new one. If so, this is an indicator that there are old database files kicking around. I found my db-files in C:\ProgramData\MySQL. Uninstall MYSQL, nuke this directory (assuming you don't care about the database) and then re-install and you'll be good.

Solution 2

If you dont care about the existing databases then do what I did, it will surely work.

  1. disable antivirus and make sure port 3306 is open (not blocked by windows/other firewall)
    This step is actually just for safety..
  2. uninstall your current installation, remove the MySQL folder from C:\ProgramData.
    This folder will be hidden. So just type that path in the address bar to access it.
  3. After removing C:\ProgramData\MySQL restart your computer.
  4. Reinstall MySQL server and you wont have any problem.

The problem was due to file C:\ProgramData\MySQL\MySQL Server 5.5\data\ib_logfile0.file. because each time you uninstall and reinstall program, it appends the data to this file. It will result in larger file. Which will result in an error in InnoDB.

If you want you can remove that file only. But I wanted a clean reinstall, so I removed everything :-)

Solution 3

For me, this problem seemed to be connected to the fact that I was trying several times to install MySQL and also changing the location of the database files. If you get the 1067 error in this situation

  1. make sure the datadir option in my.ini points to your new database directory
  2. make sure you've copied all files from the default directory to the new directory
  3. delete any ibdata and ib_logfile files from the new directory.

=== Details ===

I was installing MySQL Server 5.5 on Win 7 and getting this problem - the MySQL Server Instance Configuration Wizard kept hanging on "Start service". I tried uninstalling and deleting all local MySQL files, and also running the wizard as administrator, but kept getting the same result.

The MySQL troubleshooting documentation gave some good clues. I eventually realised the problem was to do with me changing the location of the MySQL data files in the wizard from the default C:\Program Files\MySQL\MySQL Server 5.5\data to D:\MySQL Datafiles. MySQL has essential system files in that data directory - if it can't find them the service won't start.

  • I opened the configuration file C:\Program Files\MySQL\MySQL Server 5.5\my.ini in notepad (running notepad as admin). I found the config wizard hadn't changed the datadir option, which was still pointing to the default folder. I changed it manually to the new address and saved the file.

  • Tried starting the MySQL service manually, but go the same 1067 error.

  • Realised none of the system files were in the new directory, so copied all files from C:\Program Files\MySQL\MySQL Server 5.5\data to the new location and tried restarting the MySQL service manually. Got the old error.

  • When I looked in the new data files directory I found MySQL had created an .err log file there with these lines

InnoDB: No valid checkpoint found.

InnoDB: If this error appears when you are creating an InnoDB database,

InnoDB: the problem may be that during an earlier attempt you managed

InnoDB: to create the InnoDB data files, but log file creation failed.

InnoDB: If that is the case, please refer to

InnoDB: http://dev.mysql.com/doc/refman/5.5/en/error-creating-innodb.html

The page it referred to told me to delete any old ibdata and ib_logfile files from my data directory that were left over from previous installation attempts. As soon as I did this the service was able to start.

Solution 4

The install crapped out on me as well. I closed the hung process and then went to START > All Programs >> MySQL >> MySQL Server 5.1

At this point, you should hold down the SHIFT key, and right-click on "MySQL Server Instance Config Wizard" and select "RUN AS ADMINISTRATOR" from the menu. You should be able to run through the entire setup again, and it should not hang at the end. "RUN AS ADMINISTRATOR" made all the difference!

Solution 5

I had the same issue that the MySQL Server Instance Configuration hanged at Start Service. I tried used Run As Administrator option stiil had the same issue.

After removing ibdata and ib_logfile from datadir it started.

The error I had in .err file is below.

110616 10:32:35 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: Error: log file .\ib_logfile0 is of different size 0 23068672 bytes
InnoDB: than specified in the .cnf file 0 25165824 bytes!
110616 10:32:35 [ERROR] Plugin 'InnoDB' init function returned error.
110616 10:32:35 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
110616 10:32:35 [ERROR] Unknown/unsupported table type: INNODB
110616 10:32:35 [ERROR] Aborting

110616 10:32:35 [Note] C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld: Shutdown complete
Share:
27,070

Related videos on Youtube

Thomas Owens
Author by

Thomas Owens

Professionally, I'm a software engineer focusing on agile and lean software development and software process improvement. I work to help engineers, teams, and organizations be successful. I have experience with a wide variety of types of software, ranging from embedded systems to desktop applications to web applications. In my spare time, I'm a runner, a photographer, and a casual gamer. Find me on LinkedIn, Twitter, Reddit, Medium, GitHub, Quora, and ProjectManagement.com. Support my freely available (CC BY and CC BY-SA) content through Patreon, PayPal, Buy me a Coffee, or my Amazon Wishlist.

Updated on September 17, 2022

Comments

  • Thomas Owens
    Thomas Owens almost 2 years

    I'm trying to set up my laptops to function as mobile development environments. Installing the software on my Linux machine and getting it configured was fairly straightforward, however I'm having trouble getting MySQL 5.1 Server installed and configured on Windows 7 Professional 64-bit. I'm currently using the Windows MSI Installer for the complete MySQL 5.1 system (as opposed to the Essentials installer also available). I've tried to install using both the 32-bit and 64-bit versions of MySQL 5.1 - the same events occur in both.

    I've installed both the Server Instance Configuration Wizard and Workbench and everything appears to be installed just fine. When I open the Instance Configuration Wizard, I select Detailed Configuration. On the next screen, I select Development Environment, then Multifunctional Database on the next screen. I leave the InnoDB settings unchanged. I select Manual Setting with 5 concurrent connections. I enable TCP/IP Networking on Port 3306 and Enable Strict Mode. I select the Standard Character Set. I check the boxes for Install as a Windows Service (and provide the name "MySQL") and Include the Bin Directory in Windows PATH. On the next screen, I set my root user name and password. I do not enable root access from remote machines and I also do not create an anonymous account.

    On the final screen of the wizard, when I click "Execute", the first two tasks (Prepare Configuration and Write Configuration File) complete. However, when it reaches Start Service, the wizard hangs and becomes unresponsive ("Not Responding" appears in the title bar and Task Manager).

    I would really like to be able to use both my Windows and Linux laptops as full-blown mobile development environments, but I can't do that without being able to run MySQL. Has anyone encountered this problem before? What options do I have to correct it?

    • Admin
      Admin almost 14 years
      Are you using the 32-bit version or the 64-bit version of MySQL?
    • Admin
      Admin almost 14 years
      I've tried both, but I would rather install the 32-bit version to run the exact same version of MySQL as my other machine (although I don't really know if 32 vs 64 bit on both of my dev machines would make a different - I don't think it would).
  • Thomas Owens
    Thomas Owens almost 14 years
    It's not an MSI. The configuration tool is already installed. I just can't use it to configure the instance.
  • Thomas Owens
    Thomas Owens almost 14 years
    Could you elaborate on how to install the service and set the root password?
  • Thomas Owens
    Thomas Owens almost 14 years
    Ah. I missed a whole section in your link - I'll try it tomorrow and let you know how it goes.
  • Joel Coehoorn
    Joel Coehoorn almost 14 years
    @Thomas - okay, I got hung up on the "using the Windows MSI installer" line. That said, the advice still applies: make sure you run the program as administrator.