esc
Type to search across all notes

MySQL Setup Tutorial

Installation

  1. Download MySQL Community Server at http://dev.mysql.com/downloads/mysql/, Windows ZIP Archive
  2. Extract the ZIP Archive to a path, e.g. C:\Program Files\MySQL (aliased ~)
  3. Open my-default.ini in the MySQL directory and edit it: remove # before basedir, datadir, port:
basedir = ~
datadir = ~\data
port = 8888
  1. Open command line at ~\bin and run mysqld --console
  2. Open a new command line at ~\bin and run mysql -u root -p to login as root user (no password initially)
  3. mysql> status to see the current connection status
  4. Ctrl + C to shut down the server

MySQL Workbench

Download MySQL Workbench at http://dev.mysql.com/downloads/workbench/, Windows ZIP Archive.

Troubleshooting

Problem: When Ctrl + C shuts down the server, connections can still be established.

Resolution: Run mysqladmin -u root shutdown from ~\bin

Reference: http://dev.mysql.com/doc/refman/5.1/en/windows-start-service.html

Problem: After changing my-default.ini to set the server port to 8888 from 3306, the server restarted with port unchanged.

Resolution: Rename my-default.ini to my.ini.