Starting and Stopping the MySQL Server Using a Command Line
Internet Express provides a startup script for MySQL in /sbin/init.d/mysql.
Use the following command to start MySQL on the command line:
#/sbin/init.d/mysql start
Use the following command to stop MySQL on the command line:
#/sbin/init.d/mysql stop
MySQL Configuration Files
The file /etc/my.cnf stores default startup options for both the server and for clients. To ensure the proper configuration of this file, the MySQL developers have included four sample my.cnf files within the distribution:
•
•
•
•
Each of these files denotes recommended configuration settings in accordance with system resource availability.
These files are available under /usr/local/mysql/share/mysql.
MySQL Log Files
The MySQL log files are created under /usr/local/mysql/logs.
The error log file indicates when mysqld was started and stopped and also any critical errors that occur while the server is running. If mysqld notices a table that needs to be automatically checked or repaired, it writes a message to the error log.
The general log is a general record of actions taken by mysqld. The server writes information to this log when clients connect or disconnect, and it logs each SQL statement received from clients. The general log can be useful when you suspect an error in a client and want to know exactly what the client sent to mysqld.
Viewing the MySQL Error Log
View the contents of the MySQL error log from the Administration Utility, as follows:
1.From the Manage Components menu, choose MYSQL Database Management System. The Manage MYSQL menu is displayed .
2.On the Manage MYSQL menu, choose View MYSQL Error Log. The contents of the log file are displayed. Use the standard navigation features to advance page by page, go to a specific page, or search for a particular text string.
Viewing the MySQL General Log
View the contents of the MySQL error log from the Administration Utility, as follows:
1.From the Manage Components menu, choose MYSQL Database Management System. The Manage MYSQL menu is displayed .
2.On the Manage MYSQL menu, choose View MYSQL General Log. The contents of the log file are displayed. Use the standard navigation features to advance page by page, go to a specific page, or search for a particular text string.
Administering MySQL 259