在文件/etc/rc.d/rc.local中添加如下两行:
echo "Starting MySQL Server"
/etc/rc.d/init.d/mysql.server start
2.MySQL关闭同步:
在文件/etc/rc.d/rc.halt开头插入如下两行:
echo "Stopping MySQL Server"
 
 
/etc/rc.d/init.d/mysql.server stop
说明:
1.文件/etc/rc.d/init.d/mysql.server是从mysql的安装子目录support-files下拷贝过来的;
2.由于mysql.server默认认为mysql安装于目录/usr/local/mysql下,如果你的mysql不是安装在这个目录下,请创建符合链接,比如:
ln -s /var/log/bak/mysql-5.0.51a-linux-i686-glibc23/ /usr/local/mysql