如果你都是按照默認配置安裝的那麼只要按照如下步驟就可以了
1、cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql 將服務文件拷貝到init.d下,並重命名爲mysql
2、chmod +x /etc/init.d/mysql 賦予可執行權限
3、chkconfig --add mysql 添加服務
4、chkconfig --list 顯示服務列表
如果看到mysql的服務,並且3,4,5都是on的話則成功,如果是off,則鍵
chkconfig --level 345 mysql on
5、reboot 重啓電腦
6、netstat -na | grep 3306,如果看到有監聽說明服務啓動了