On these versions of Windows, MySQL uses TCP/IP to connect a client to a server. (This will allow any machine on your network to connect to your MySQL server.) Because of this, you must make sure that TCP/IP support is installed on your machine before starting MySQL. You can find TCP/IP on your Windows CD-ROM.
Note that if you are using an old Windows 95 release (for example, OSR2), it's likely that you have an old Winsock package; MySQL requires Winsock 2! You can get the newest Winsock from http://www.microsoft.com/. Windows 98 has the new Winsock 2 library, so it is unnecessary to update the library.
To start the mysqld
server, you should start a console window (a
``DOS'' window) and enter this command:
shell> C:\mysql\bin\mysqld
This will start mysqld
in the background. That is, after the server
starts up, you should see another command prompt. (Note that if you start the
server this way on Windows NT, 2000, or XP, the server will run in the
foreground and the next command prompt will not appear until the server exits.
To run client programs while the server is running, you should open another
console window.)
You can stop the MySQL server by executing this command:
shell> C:\mysql\bin\mysqladmin -u root shutdown
This invokes the MySQL administrative utility mysqladmin
to connect
to the server as root
, which is the default administrative account
in the MySQL grant system. Please note that users in the MySQL grant
system are wholly independent from any login users under Windows.
If mysqld
doesn't start, please check the error log to see if the
server wrote any messages there to indicate the cause of the problem.
The error log is located in the `C:\mysql\data' directory. It is
the file with a suffix of `.err'. You can also try to start the
server as mysqld --console
; in this case, you may get some useful
information on the screen that may help solve the problem.
The last option is to start mysqld
with
--standalone --debug
.
In this case mysqld
will write a log file
`C:\mysqld.trace' that should contain the reason why
mysqld
doesn't start. See section E.1.2 Creating Trace Files.
Use mysqld --help
to display all the options that
mysqld
understands!