MySQL Server on Windows Vista x64 Setup Guide, An Install That Works!!!

logo-mysql
After hours of beat­ing our heads against a wall, we’ve finally come up with a solid MySQL install guide. It wasn’t easy, but it’s some­thing we needed, and obvi­ously some­thing our fel­low devel­op­ers needed. We spent hours read­ing through end­less threads with errors such as;

Can­not Cre­ate Win­dows Ser­vice for MySQL. Error:0,
Vista x64 could not start the ser­vice mysql,
Win­dows could not start the mysql ser­vice on local com­puter error 1067,
Can’t create/write to file,
Can’t con­nect to [local] MySQL server,
Table ‘tbl_name’ doesn’t exist,

Yet even after read­ing through what seemed like hun­dreds of cries for help, and just as many sup­posed fixes, we were still no closer to resolv­ing this issue. So after com­ing to the real­iza­tion that there was lit­tle help to be had online, we just attacked our install, and dealt with the issues one by one. After repeated failed installs, and botched setups, we were able to get MySQL loaded prop­erly. The setup instruc­tions you see below were repeat­able on 4 dif­fer­ent machines, when fol­lowed prop­erly. If you run into an issue, please let us know. Good luck with your setup.

MySQL Vista x64 Setup Guide By The Gurus :-)

We’re going to make this as easy, as straight for­ward, and as thor­ough we can. You’ll get best results from a clean install. We attempted to mod­ify an exist­ing setup with mixed results, most often failure.

If you’ve run the installer once before, you’ll need to remove the fol­low­ing reg­istry key.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services With the “Ser­vices” key selected and high­lighted, look to your right, and delete the string named “Descrip­tion” with a Data Value of “MySQL Ser”.

In some instances you may find that “my.ini” has been saved to the root of your drive, or other loca­tions. These files will need to be deleted. While its rare with the cur­rent installer, it can, and will error out your install. Check the fol­low­ing loca­tions. MySQL accesses my.ini files in this order. C:\Windows\my.ini C:\Windows\my.cnf C:\my.ini C:\my.cnf C:\mysql\my.ini C:\mysql\my.cnf

Now you’re ready to install MySQL.

Our com­puter setup, Win­dows Vista Ulti­mate x64, IIS7, PHP. This machine is also run­ning Zonealarm. For our install we set Zonealarm to “Game Mode” and “Allow All”. You may also want to dis­able your Anti-Virus, and Fire­wall appli­ca­tions temporarily.

Down­load: mysql-essential-5.1.37-winx64.msi

When choos­ing a setup type, choose “Cus­tom Install” . Select and high­light “MySQL Server” and change the install direc­tory to C:\mysql\ The folder does Not need to exist, it will be gen­er­ated. Right below it, select and high­light “MySQL Server Datafiles” change this install direc­tory to C:\mysql\ as well.

Run the installer.

After the installer com­pletes, uns­e­lect “Con­fig­ure Server”. Go to your install direc­tory, and open your bin folder, C:\mysql\bin\. Right click mysqld.exe, choose prop­er­ties, and set it to a Com­pat­i­bil­ity mode of “Win­dows XP (Ser­vice Pack 2)”. For good mea­sure, we also did the same with mysql.exe. But note that we were able to get a valid setup with only mysqld.exe set to com­pat­i­bil­ity mode.

Nav­i­gate to All Pro­grams, “MySQL”, “MySQL Server 5.1”, and click “MySQL Server Instance Con­fig Wizard”.

Assum­ing this is a devel­oper machine, the con­fig­u­ra­tion goes as follows.

Choose “Detailed Configuration”.

Next page choose “Devel­oper Machine”.

Next page choose “Mul­ti­func­tional Database”.

This seemed to be an impor­tant step in our install. On the “Inn­oDB Table­space Set­tings” page, leave C: as the root drive, but change the direc­tory in next drop­down to \Data\ . This will gen­er­ate the data direc­tory that most default installs are missing.

Next page choose “Deci­sion Support”

Next page choose “Enable TCP/IP Net­work­ing, port 3306, and put a check in “Add fire­wall excep­tion for this port”, also put a check in “Enable Strict Mode”. Most of these are defaults.

Next page choose “Stan­dard Char­ac­ter Set”.

Next page choose “Install As Win­dows Ser­vice” ser­vice name “MySQL” “”””BIG NOTE HERE “”“DO NOT””” put a check mark in “Launch the MySQL Server auto­mat­i­cally”.”””” Launch auto­mat­i­cally caused errors every time. You may also want to put a check in “Include Bin Direc­tory in Win­dows PATH”, this may come in handy later down the road.

Next choose a pass­word; ours worked using a phone num­ber. ie. numer­i­cal code 7654321, com­plex­ity didn’t seem to mat­ter here.

Exe­cute your install. Every­thing should install with­out trouble.

Now you’ll need to make your new MySQL ser­vice start auto­mat­i­cally. Go to run, type services.msc Or nav­i­gate to Con­trol Panel, Admin­is­tra­tive Tools, and Ser­vices. You should see MySQL run­ning as a ser­vice. Right click MySQL, choose prop­er­ties, and set the startup type to “Auto­matic”. Hit apply, and ok, and that’s it. You’ve now got func­tion­ing MySQL data­base, on your Vista x64 com­puter. These instruc­tions should also apply to Win­dows XP, and Win­dows 7. Please let us know either way.

Tell us how your setup went. Were we thor­ough enough? Did we miss any­thing? Let us know by leav­ing a com­ment. Thanks for read­ing, and happy com­put­ing. :-)


Was this article helpful? Here's a few related articles which may also interest you.

Related Posts:


8 Comments to “MySQL Server on Windows Vista x64 Setup Guide, An Install That Works!!!”

  1. evilmaster says:

    I’ve almost lost all of my hair try­ing to get MySQL to install on Win­dows 7 x64. Fol­low­ing these steps I suc­cess­fully installed 64-bits MySQL 5.1.42 on Win­dows 7 x64. Only dif­fer­ence was that I couldn’t choose XP for com­pat­i­bil­ity mode for some rea­son. Thanks A LOT!

  2. Admin says:

    Wow… Con­grats on the install. That’s def­i­nitely not an easy feat. I’ve per­son­ally only recently adopted Win­dows 7 X64. The install you just accom­plished being one of the many obsta­cles I’ve been dread­ing, but at least now I know it can be done. :-) I don’t know about you, but I’ve been extremely happy with my upgrade. Win­dows 7 X64 is start­ing to look like one of the most agile, and refined oper­at­ing sys­tems I’ve used in quite awhile.… Well that is after I spent 2 days trim­ming the fat, and using every tweak and reg­istry mod in our big bag of tricks.

    Any­ways, I’m glad our arti­cles are help­ing peo­ple. Keep the com­ments coming.

  3. Flo says:

    Hasn’t helped me (yet) as the Con­fig Wiz­ard still fails when installing the ser­vice, some­times a red X, some­times it just freezes forever.

  4. Admin says:

    Go back and review your error log, that’s how we were able to pro­vide this fix. I’m guess­ing your prob­lem is related to a dif­fer­ent aspect of the install. Good luck. :-)

  5. cgtut says:

    Every­thing looks good, except that Vista still thinks that there is a MySQL ser­vice in the old direc­tory, so it will not allow me to install MySQL as a Win­dows ser­vice. MySQL.exe no longer exists in the old direc­tory, so it can­not be removed. Any ideas?

    Thanks for all your help!

  6. Admin says:

    We would prob­a­bly sug­gest delet­ing the ser­vice. But before you do so, back up your reg­istry. A good tool for this is Erunt Its an oldie, but a goodie. Once you’ve got a good backup, view your ser­vices by using the fol­low­ing command…

    1
    
    services.msc

    Look for you’re run­ning MYSQL ser­vice, open its prop­er­ties, and copy its “Ser­vice Name”, prob­a­bly “MySQL” or some­thing sim­i­lar. Then run the fol­low­ing com­mand to delete the ser­vice. Hint: the quotes are only needed in this com­mand if there’s a space in the ser­vice name. Oth­er­wise don’t use quotes, and replace the ser­vice name with the desired target.

    1
    
    SC DELETE "Service Name"
  7. Tushar Sood says:

    Hi,

    I have been try­ing to do the same for the last 3 months but was unsuc­cess­ful. Every­time the installer used to go in unre­spond­ing state while try­ing to start the service.

    But your solu­tion has worked per­fectly. Thanks a lot.…

  8. mark says:

    THANK YOU SOOOOOOOOOO MUCH, i’ve been on this for days and a dead­line is looming.

Leave a Comment