Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Guide: MySQL
#8
Running the Server

MySQL consists of a server which runs in the background, plus clients and utilities that access it via network connections.

It is worth knowing how to use command line utilities as clients, at least for debugging or as a backup. In particular, if you are not sure whether the server is running, you can tell by trying to execute the command line client C:\mysql\bin\mysql, and the server can always be stopped by C:\mysql\bin\mysqladmin -u root shutdown.

The way you start up the server depends on the platform, and what tools you choose to use. It is worth knowing the 'raw' way, which is to run the C:\mysql\bin\mysqld command. To get it to start automatically when the computer is switched on, put the mysqld command into the start/programs/startup menu. To configure, edit the file C:\windows\my.ini by hand (it is better to put options in that file, rather than adding them as command line arguments to the mysqld command).

An alternative is to use C:\mysql\bin\winmysqladmin, which is useful, but confusing. The first time you use it, it asks you for a username and password which it puts in C:\windows\my.ini. After that, or whenever you start it up by hand, it is likely to pop up a window briefly, but then disappear as if it has crashed. This is because it is running in the background, accessible via a little traffic lights icon in the system tray (bottom right of your screen, probably). Winmysqladmin installs itself in the start/programs/startup menu, to start the server at switch-on. To interact with it, right click on the icon and choose "show me", and you can use it to (e.g.) edit the my.ini file. When you have finished with it, use "hide me" to avoid shutting it down.

Another alternative, on Windows NT, 2000, XP but not 95, 98, ME, is to run C:\mysql\bin\mysqld --install which will run the server and also install it as a service (the equivalent of putting in start/programs/startup).


I use winmysqladmin myself.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)