Tutorial: Install MySQL 4.0 - Windows

Dr. Thomas E. Hicks
Computer Science Department
Trinity University


About MySQL

MySQL is a small, compact database open source server that supports standard SQL (ANSI). MySQL compiles on a variety of platforms; it's multithreading abilities on Unix servers make for great performance. MySQL can be run as a service on Windows NT/2000/XP and as a normal process in Windows 95/98 machines.

MySQL Oriented Tutorials

MySQL Tutorial: Install My SQL Windows 3.23

Install MySQL Windows 4.0

Database Table Management

Introducton To SQL

MySQL-IIS Web Driven Guestbook

Download Software

1] Using Internet Explorer or Netscape, navigate your browser to URL http:\\www.mysql.com [See Below!] Select the Download link.  [See Below!]

A copy is available from this site.


2] Select the MySQL 4.0 link.  [See Below!]

3] Select the Pick A Mirror link.  [See Below!]

4] Select a download site close to you. I have chosen one of the USA HTTP links.  [See Below!]

5] Using the mouse, select the Save Button.  [See Below!]

6] Select a download location. I have chosen to download to C:\Software\MySQL-4  [See Below]

7] The download time will vary with your download choice, connection speed, and time of day.  [See Below!]

Install MySQL

1] If you do not have any decompression software, download and install an evaluation copy of WinZip. Open your download folder. Using the mouse, double-click on the mysql-4.0.11-gamma-win.zip.  [See Below!]

2] As is always the case with  zipped software, if there is an opportunity to install it, do so; if not, choose the extract option. There is an install option. Using the mouse, select the Install Button.  [See Below!]

3] Using the mouse, select the OK Button.  [See Below!] 

4]  Using the mouse, select the OK Button.  [See Below!] 

5]  Using the mouse, select the Next Button.  [See Below!] 

6]  Select an install location. Space permitting, it is a good idea to install all windows applications in the Program Files directory.  Using the mouse, select the Browse Button.  [See Below!] 

7] Select an install location.  I have chosen C:\Program Files\MySQL in which to install the software. Using the mouse, select the OK Button.  [See Below!] 

8]  Using the mouse, select the Yes Button.  [See Below!]  

9] Using the mouse, select the Next Button.  [See Below!]   

19] Using the mouse, select the Typical Radio Button.   Using the mouse, select the Next Button.  [See Below!]   

11] Using the mouse, select the Finish Button.  [See Below!]   

Was The MySQL Installation Successful

1] Using the mouse, Open the Program Files Directory. Now open the MySQL directory. [See Below!]   

2] The MySql.exe application may be found in folder bin [See Below!]   

3] Open A Command Prompt. Using the mouse, hold down the Start Menu and Select Run.

 Enter cmd in the Run window.

Change the default drive to be C:\Program Files\MySQL\bin.

Execute MySQL. Normally you should install MySQL as a service on Windows NT/2000/XP. The installation on my XP Pro did not work.     If your application connects, skip to # 4 below.  [See Below!] 

The installation on Windows 2000 Pro and Windows 2000 Server has also had the same problem; since the problem has not always occurred with Windows 2000, it might be related to which service pack is installed.  I have found a fix on the Internet.  If your application connects, skip to # 4 below.  [See Below!] 

The MySQL  website offered the following work-around. It worked.

HOW I FIXED THE 10061 error: the easy way. I installed mysql as directed above, and then went to the command line and tried to run it and got ERROR 2003: can't connect to MySQL server on 'localhost' . The responses to these vary, but go through all the steps A - ???

----------------------------- The Connection Fixes -----------------------------

  1. I ran winmysqladmin.exe. Open to folder C:\Program Files\mysql. Using the mouse, double click on  winmysqladmin.exe. (Se  Below!)

  1. Fill in a UserName and Password. Using the mouse, select/push the OK button.

  1. Return to the command prompt. Make sure that the service is properly stopped. [This calls the MySQL administation utility as user `root', which is the default Administrator in the MySQL grant system]

    Execute mysqladmin -u root shutdown [See Below!]   

  1. Please note that the MySQL grant system is wholly independent from any login users under Windows.
    Now install the MySQL server service:
    Execute mysqld-max-nt --install  [See Below!]   

  1. It is now time to open the Windows MySQL Administration Control Panel.
    Execute winmysqladmin  [See Below!]   

This time the winmysqladmin worked. [See Step #4 Below!] 
4] The SQL Admin console is now working. (See Below!)
5] Close the Administrative Control Panel. I noticed a new icon that looks like a street light on my task bar. [See Below!]    
6] Once again I attempted to Execute MySQL. As mentioned on the web site, it worked! They are not sure why! [See Below!]    
MySQL is now up and running! I have had two systems in which I had to return to step 3C and follow through to step 6 a second time

Rapid StartUp In Windows

1] Open your operating system folder; it will generally be WINNT or Windows. Open system32 folder. Locate function CMD.EXE. Using the mouse, right-mouse click on CMD and select Create Shortcut. (See Below!)

2] Locate the short cut and Rename it to MySQL (See Below)

 it to MySQL (See Below)

3]  Right-Mouse Click On The Shortcut and select Properties. (See Below)

4]  Change the Start In to your MySQL binary directory; for me this is C:\Program Files\MySQL\bin. Each time the command prompt is opened with this short cut, it will immediately place you in the MySQL binary directory where one might launch MySQL.  (See Below)

Let us now change the icon associated with our shortcut. Using the mouse, select/push the Change Icon button. (See Above)

5] Perhaps you want to use an icon editor and create your own icon, but I will select one from C:\WINNT\system32\SHELL32.dll. Using the mouse, push/select your choice of icon. Using the mouse, push/select the OK button.

6] Using the mouse, push/select the Apply button. (See Below!)

7] Pace a copy of your MySQL shortcut in your start menu, on the desktop, and/or in your quick launch bar; I have chosen the quick launch bar below. (See Below)

8] Select your Shortcut. Enter MySQL.. (See Below)


May be accessed through URL: http://www.cs.trinity.edu/~thicks
May also be accessed through URL: http://carme.cs.trinity.edu
This Document May Not Be Printed or Reproduced Without Written Permission.
 2003 Copyright : Dr. Thomas E. Hicks
Permission granted : Professional Educators & College Students may print one copy of this page!

Dr. Thomas E. Hicks

Computer Science Department    
Trinity University

"Dr. Web"