|MySQL is a fast, multi-threaded, multi-user open source SQL database server.
The MySQL database is released under the GNU General Public License (GPL). MySQL can be used for free when you are not distributing any part of the MySQL system. For example: If you run a commercial web site using the MySQL Database Software as long as MySQL is not distributed.
Please read the MySQL manual for situations where a commercial license is needed.
More information about MySQL can be found at: http://www.mysql.com
MySQL online manual can be found at: http://dev.mysql.com/doc/index.html
The latest MySQL version can be downloaded from: http://dev.mysql.com/downloads/index.html
Installing MySQL 3.23.
Operating system used
Windows XP Home Edition Version 5.1 SP 2
- Download and unzip mysql-3.23.55-win.zip
Note: MySQL Reference manual can be found in ..\mysql\docs\
- Execute setup.exe to install MySQL Servers and Clients on your computer.
- Select the destination folder "mysql", e.g.: C:\Tools\mysql
Note: We will not change the data directory located at ..\mysql\data
- Next step is to prepare the Windows MySQL Environment using the WinMySQLadmin tool.
Execute file C:\..\mysql\bin>winmysqladmin.exe
The WinMySQLadmin window will disapper after a few seconds and an icon will appear in the system bar. Just click on the icon and select "show me". The WinMySQLadmin window will be displayed.
- Select "my.ini Setup" Tab
- Check if Base Dir=C:/Tools/mysql
- Press button: Pick-up and Edit my.ini" file
- Add the following lines:
You must add the lines basedir and datadir in the "my.ini Setup" Tab.
If you do not add these lines, MySQL can NOT be run as a service on Windows NT/2000/XP.
- Select radio button: mysqld-nt (See Note 1)
- Press button: Save Modifications
You should see the following:
The Windows distribution includes both the normal and the MySQL-Max server binaries. Here is a list of the different MySQL servers you can use:
||Compiled with full debugging and automatic memory allocation checking, symbolic links, InnoDB, and BDB tables.
||Optimised binary with no support for transactional tables.
||Optimised binary for NT/2000/XP with support for named pipes. You can run this version on Windows 9x/Me, but in this case no named pipes are created and you must have TCP/IP installed.
||Optimised binary with support for symbolic links, InnoDB and BDB tables.
||Like mysqld-max, but compiled with support for named pipes.
- Open a DOS window.
Start MySQL server: C:\..\mysql\bin>mysqld-nt --standalone
Note: No messages will be displayed.
- Close the DOS window.
- Start winmysqladmin.exe and select "Err File" tab, you should see:
mysqld-nt: ready for connections.
Note: The yellow light is also burning:
- You can test whether MySQL is working by executing the following (DOS) commands:
C:\..\mysql\bin>mysqlshow -u root mysql
C:\..\mysql\bin>mysqladmin version status proc
- If you want to install MySQL as a service on Windows NT/2000/XP, you must execute the following commands:
- Service started automatically during boot process.
In the Windows Services window you should see:
- Service NOT started automatically during boot process.
In the Windows Services window you should see:
- To remove MySQL as a service on Windows NT/2000/XP
- Start the command line MySQL monitor:
C:\..\mysql\bin>mysql -u root
- The default privileges on Windows give all local users full privileges to all databases without specifying a password. To make MySQL more secure, you should set a password for all users and remove the row in the mysql.user table that has Host='localhost' and User=' '.
You should also add a password for the root user. The following example starts by removing the anonymous user that has all privileges, then sets a root user password "mysecret":
mysql> use mysql
mysql> delete from user where host='localhost' and User='';
C:\..\mysql\bin>mysqladmin -uroot password mysecret
- An overview of a few commands which can be executed within directory C:\..\mysql\bin>:
||Displays the help of mysqlshow. This command shows the structure of a mysql database.
|Example: Display table names of a selected database.
mysqlshow -uroot -pmysecret mobilefishdb
||Displays the help of mysqladmin. This command executes the administration program for the mysqld daemon.
|mysqladmin -u<user> password <password>
||Example: Set password "mysecret" for user root.
mysqladmin -uroot password mysecret
-p<old_password> password <new_password>
|Example: Change password into "mynewsecret" for user root.
mysqladmin -uroot -pmysecret password mynewsecret
||Displays the help of mysql. This command starts the command line MySQL monitor.
|Example: Starts the command line MySQL monitor.
mysqlshow -uroot -pmysecret