How to Setup MySQL on Windows 7

If you have ever wanted to setup WordPress on your local machine, or maybe try your hand at PHP development then you would most assuredly want to setup MySQL. In this post I hope to provide a step by step guide on installing and setting up MySQL.

These steps revolve around the installing and setting up of MySQL 5.5.

Download MySQL

  1. Download the MySQL Installer for Windows from http://dev.mysql.com/downloads/
  2. Run the installer once it has completed downloading
  3. Click “Install MySQL Products” on the Welcome screen
  4. Click “I accept the license terms” on the License Agreement screen
  5. Click “Next”
  6. Click “Execute” on the Find latest products screen
  7. Click “Next” on the Find latest products screen after the operation is complete
  8. Click “Full” on the Choosing a Setup Type screen
  9. Click “Next”
  10. Click “Next” on the Check Requirements screen
  11. Click “Execute” on the Installation Progress screen

  12. The process will begin to install all of the listed components.

  13. Click “Next” on the Installation Progress screen once the process is complete
  14. Click “Next” on the Configuration Overview screen to install “MySQL Server 5.5.28”
  15. Click “Next” on the MySQL Server Configuration screen 1 of 3
  16. Enter a password in the “MySQL Root Password” and “Repeat Password” fields
  17. Make note of this password as it is the root password to MySQL. This means if you lose it then you will lose access to your MySQL instance.

  18. Click “Add User”
  19. Fill in all the fields on the MySQL User Details dialog
    • Username: mysql_admin
    • Host:
    • Role: DB Admin
    • Authentication: MySQL
    • Password: anything as long as it is different from the root password
    • Confirm Password: same as “Password”

  20. Click “OK” to close the dialog and save the user
  21. Click “Next” on the MySQL Server Configuration screen 2 of 3
  22. Click “Next” on the MySQL Server Configuration screen 3 of 3
  23. Click “Next” on the Configuration Overview screen to install the “Samples and Examples 5.5.28”
  24. Click “Next” on the Configuration Overview screen
  25. Click “Finish” on the Installation Complete screen

At this point the MySQL installation is complete. The MySQL Workbench should launch showing a screen similar to this one.

Add New MySQL Server Instance

It is a good practice to not use the root user to perform day to day activities. During the installation we created a mysql_admin user for just this puprpose. At this point we will add a new server instance for the mysql_admin login. Creating that server instance will also create a new connection for us for the same login saving us a little work.

  • Click on “New Server Instance”
  • Click on “Next”
  • Complete the Create New Server Instance Profile screen
    • Connection Name: localhost – mysql_admin
    • Connection Method: Standard (TCP/IP)
    • Hostname: localhost
    • Port: 3306
    • Username: mysql_admin
    • Default Schema: leave blank
  • Click “Next”
  • Type in the password to your mysql_admin account
  • Click “OK”
  • Click “Next” on the Test DB Connection screen
  • Click “Next” on the Windows Management screen
  • Click “Next” on the Test Settings screen
  • Click “Continue” on the Review settings dialog
  • Complete the Complete Setup screen
    • Server Instance Name: localhost – mysql_admin
  • Click “Finsih”
  • At this point the Create New Server Instance wizard will close and you will be returned to the MySQL Workbench. Notice the wizard also created a new connection for us.

    MySQL is now ready to be used. Just remember to use the mysql_admin login for all tasks. Do not use root unless it is the only option.

    Tagged with: , ,

    Leave a Reply