Tuesday, August 09, 2016

Installing MySQL on Windows using a noninstall zip archive

At-least for me, configuring MySQL zip archive on server by reading MySQL team's unfriendly, multi-navigational document has been quite a challenging task.

Here is my simplified version:
  • Download mysql noninstall zip from here: http://dev.mysql.com/downloads/mysql/
  • Extract do C:\mysql folder
  • Under c:\mysql folder you will find my-default.ini file, make a copy of it and rename it to my.ini
  • Open my.ini in notepad, You will find basedir and datadir as commented statements, just uncomment them (by removing # from the starting position of each line) and do the changes shown below
    • basedir = c:\\mysql #installatin directory
    • datadir = c:\\data   #data directory, it can be in some other drive too!
  • Open cmd.exe as administrator and type below commands one after the other
    • Go to bin folder where mysqld.exe file is present
      • cd c:\mysql\bin
    • Below command will initialize the data directory, by reading my.ini file (in our case its in c:\mysql folder)
      • mysqld --initialize
    • Install mysql as background running service in Windows.
      • mysqld --install 
    • Verify MySQL server service installation
      • in command prompt just type services.msc and hit enter
      • and look for MySQL service in the services list, set it as "Automatic"
  • That's it!
  • MySQL server will be up and running and can be accessed over 3306 port
  • Download and install the MySQL Workbench and connect to server as root with no password.

2 comments:

App Development Mumbai said...

Hi, Really great effort. Everyone must read this article. Thanks for sharing.

Buy Contact Lenses Online in India said...

Hey keep posting such good and meaningful articles.