MySQL 5.1 Installation Tutorial

This post will guide you through installing MySQL 5.1.

Installing MySQL

Step 1) Visit the MySQL Download Page. Choose the MSI Installer that corresponds to your OS type. I'm on this crappy Dell Inspiron laptop running vista, so I'll snag the x86, 32-bit MSI installer. Download MySQL Step 2)You will be prompted to log in or register, but you can actually just scroll down and click "No thanks, just take me to the downloads!" below the login form. Skip MySQL Registration Step 3)Choose a mirror close to you and download via HTTP. Step 4)When the download has completed, run the file. When the window opens, press next, and then choose "Custom" install. Custom Installation Step 5)I highly recommend including the "C Include Files" in your installation in case you ever want to do some work with c++. MySQL C++ Include Files Step 6)For MySQL, it doesn't matter if you install it to your webserver directory or to the default program files. I chose to install it to the program files. Click next and then install. Step 7)When the installation has completed and the pretty dolphin shows up, press next until it tells you the wizard is complete. Installation Complete Step 8)Make sure that "Configure this MySQL Server Now" is complete is checked. I chose not to Register the server, so you can skip that for now. Once you've made sure "Configure this MySQL Server Now" is checked, click Finish. Configure the Sever Now Step 9)When the new window pops up, click Next and then select Detailed Configuration. Select Detailed MySQL Configuration Step 10)You will then be asked whether your machine is a Developer Machine, Server Machine, and Dedicated MySQL Server Machine. If you are wanting to make web applications or communicate with databases from your computer, you should select Developer Machine. If you are unsure, you should select Developer Machine. Click Next. Select Machine Type Step 11)You will be given a list of database types to choose from. Most likely you should choose Multifunctional Database, unless you know for sure you should select one of the other options. Click Next when you've made your selection. Database Type Step 12)You will be asked where you would like the InnoDB datafile to be installed. There's no real need to change it from the default, so just click next. The path should read "Installation Path". Feel free to change it if you really want to though. InnoDB Datafile Step 13)You will be asked how many concurrent connections to the server should be allowed. Unless you know you'll need more than 20, just stick with Decision Support(DSS)/OLAP. Click Next. Concurrent Connections Step 14)Make sure "Enable TCP/IP Networking" is checked along with "Enable Strict Mode". Adjust the port if you know you need to, otherwise keep it at the provided value. Make sure to add a firewall exception for the port. Click Next. MySQL Configuration Step 15)Choose your character set. If you're planning on dealing with foreign languages, select "Best Support for Multilingualism", which will utilize the UTF-8 character set. I chose the Standard Character set. Click Next. Choose Character Set Step 16)Choose to install MySQL as a service. You can change the service name if you want, but I just left it at MySQL. I also have it set to launch automatically. You don't have to do this, but be aware you will have to launch MySQL every time you want to connect to your database.  Also, make sure you check "Include Bin Directory in windows PATH" MySQL as a Service configured for PATH Step 17)Now it's time to add in the security information. Enter your desired password into New root password and confirm it. Do not create an anonymous account. Based on your situation, you can choose to enable remote access, but I chose not to. Press Next. Step 18)Click Execute.

IF YOU ARE REINSTALLING MYSQL!!!

If you have had MySQL on your system before and have uninstalled it for whatever reason, remnants of MySQL (such as the service itself) may disrupt your reinstallation. You may receive the message "Cannot create Windows Service for MySQL.Error:0". MySQL Error:0 If you see this message, click cancel, and then head over to How to solve MySQL Error: 0. Afterwards, you will have to repeat the installation process up to this point. Sorry!

Testing your MySQL Configuration

After the service has been successfully started and the security settings successfully applied, here is what you can do to test your configuration.
  1. Open the Start Menu
  2. Go to All Programs
  3. Go to MySQL
  4. MySQL Server 5.X
  5. Open MySQL Command Line Client
When the prompt "enter password" comes up,enter the password you created during the installation configuration. If successful, you should see a screen resembling this. MySQL Configuration Test MySQL is now configured and ready for you to use! March 02, 2010
About the Author:

Joseph is the lead developer of Vert Studios Follow Joseph on Twitter: @Joe_Query
Subscribe to the blog: RSS
Visit Joseph's site: joequery.me