Stopping and Starting MySQL with Windows

This article may help you to get starting in using MySQL under NT. There is no distinction made between Windows NT, Windows 2000 or Windows XP. These three operating systems support 'Windows services' which you will not find with the Windows 95/98/ME versions. If you haven't already installed MySQL you can do so by visiting www.mysql.com and following the download instructions. There is nothing spectacular to see when installing MySQL - as far as I know it just dumps the collection of files and directories into the c:\mysql directory and you need to visit the c:\mysql\bin and list the .exe files to see what is available.

To get started you can play with MySQL by typing:

c:\mysql\bin>mysqld-nt --install
c:\mysql\bin>mysql
You will then have a command line where you can enter SQL statements ending with a semicolon and the other commands can be found by typing 'help'. You can exit by typing 'exit'.

MySQL is designed to run in the background without ever stopping, even resuming after rebooting Windows. To control Windows services you can use Window's 'net' command. For example, to list all services currently installed just type:
c:\mysql\bin>net start 
You will see MySQL listed as one of the services and if you reboot NT this service will continue. To stop the service you need to type the following two commands in the correct order:
c:\mysql\bin>net stop MySql
c:\mysql\bin>mysql-nt --remove
You might now wish to start a different version of MySQL, such as mysql-max-nt which adds support for foreign key constraints among other things, by typing the following commands:
c:\mysql\bin>mysql-max-nt --install
c:\mysql\bin>net start MySql
Now that you know the basics you can return to www.mysql.com to learn how to start building tables using MySQL's syntax nuances, connect your application to MySQL and learn why this open source database is so popular.
 

By Julian Cochran
support@digitalscores.com
DigitalScores
DigitalScores is a software development group based in Australia. Our focus is on delivering solutions that withstand future technological change; minimizing the long-term cost of every project we are involved with.