1. Start MySQL synchronization:
Add the following two lines to the/etc/rc. d/rc. local file:
Echo "Starting MySQL Server"
/Etc/rc. d/init. d/mysql. server start
2. Disable MySQL synchronization:
Insert the following two lines at the beginning of the file/etc/rc. d/rc. halt:
Echo "Stopping MySQL Server"
/Etc/rc. d/init. d/mysql. server stop
Note:
1. the file/etc/rc. d/init. d/mysql. server is copied from the mysql installation subdirectory support-files;
2. Because mysql. server considers that mysql is installed in the/usr/local/mysql directory by default, if your mysql is not installed in this directory, create a link that complies with the requirements. For example:
Ln-s/var/log/bak/mysql-5.0.51a-linux-i686-glibc23 // usr/local/mysql
3. the service configured in this way is synchronized with the system startup and shutdown. It is suitable for applications such as IPCop and their streamlined systems, and is not suitable for general releases, because the general release version is in/etc/rc. d/rc3.d/,/etc/rc. d/rc0.d/and/etc/rc. d/rc6.d.