将mysql设置为自启动了,设置方法,在/etc/rc.local末尾加上/etc/init.d/mysqld start 即可。命令如下: vi /etc/rc.d/rc.local /etc/init.d/mysqld start