Installation - MySQL 5 on Windows

From SONIVIS:Wiki

(Redirected from Installation MySQL5)
Jump to: navigation, search

This is a guide for installing and configuring MySQL (tested with MySQL 5.0.45 Win32 on Windows XP Professional SP2).

Contents

Installation

  1. Download and unpack MySQL.
  2. Start the installation with Setup.exe.
  3. Choose the Custom Setup.
  4. Change the installation directory to C:\Programme\MySQL\.
  5. Enable Configure the MySQL Server now. Thus the configuration menu opens immediately.

Alternatively you may use the XAMPP or XAMPP Lite stack.

Configuration

  1. Choose the Standard Configuration.
  2. Disable Install As Windows Service. Enable Include Bin Directory in Windows PATH.
After installation please edit my.cnf and enable InnoDB engine by replacing
skip-innodb
with
#skip-innodb

Start and stop MySQL

Start MySQL

Start cmd and type:

...> cd C:\Programme\MySQL
C:\Programme\MySQL> bin\mysqld-nt --defaults-file=my.ini --standalone --console

(Do not close the cmd window.)

Stop MySQL

Start cmd and type:

...> cd C:\Programme\MySQL
C:\Programme\MySQL> bin\mysqladmin --user=root shutdown

Use batch-files for starting and stoping MySQL in Windows

  1. Download mysql_start.7z and mysql_stop.7z.
  2. Unpack the files to C:\Programme\MySQL.
  3. Start MySQL with mysql_start.bat (Do not close the window.)
  4. Stop MySQL with mysql_stop.bat (This will be closed the mysql_start.bat window.)

Managing MySQL under Linux

Under normal conditions, MySQL will be automatically started at the system startup.

If you have to manually stop and start it again, you will need sudo or root privileges to type the following in the command line (note the '#' symbol indicating root privileges):

  • Start MySQL: # mysqld_safe &
  • Stop MySQL: # mysqladmin -u root -p shutdown (then introduce your MySQL root passw when prompted to do so)

Or type sudo before each command above.

Personal tools