Jump to content

XML - Managing Data Exchange/Quick Windows installation

From Wikibooks, open books for an open world

Currently (04/05/06) MySQL 5.1 does not come with the installer (Beta Version). Here are instructions to help you with the installation. Details information can be found in the online manual . If you follow these recommendations correctly, you should need to get rid of any previous MySQL running in your System.

1. Extract the archive to the desired install directory. Traditionally, the MySQL server is installed in C:\mysql. If you do not install MySQL at C:\mysql, you must specify the path to the install directory in an option file.

2. An option file can be created and modified with any text editor (Wordpad..). For example, if MySQL is installed in C:\someDirectory\mysql and the data directory is in C:\mydata\data, you can create an option file containing a [mysqld] section to specify values for the basedir and datadir parameters:

[mysqld]

  1. set basedir to your installation path

basedir=C:/someDirectory/mysql

  1. set datadir to the location of your data directory

datadir=C:/someDirectory/mysql/data

I used the option file found in a previous version of MySQL and just modified it for this version's directory.


3. To start the server, enter this command:

C:\> "C:\someDirectory\MySQL\bin\mysqld" --console

When the server finishes its startup sequence, you should see something like this, which indicates that the server is ready to service client connections:

mysqld: ready for connections Version: '5.1.7-beta' socket: '' port: 3306

The server continues to write to the console any further diagnostic output it produces. You can open a new console window in which to run client programs.

The MySQL server can be started manually from the command line. This can be done on any version of Windows.


To start using MySQL 5.1, you should start a console window and enter this command:

C:\> MySQL -u root

You can stop the MySQL server by executing this command:

C:\> "C:\someDirectory\MySQL\bin\mysqladmin" -u root shutdown


Note: If the MySQL root user account has a password, you need to invoke mysqladmin with the -p option and supply the password when prompted.

     If you are running another version on MySQL, dont forget to stop the Service.

To Start MySQL as a Windows Service more information can be found in the MySQL 5.1 Manual .