mysql 的守護程序是mysqld
[root@localhost ~]# service mysqld start
啟動 MySQL:
你可以看看你的服務是否已經添加到linux上
[root@localhost ~]# chkconfig --list mysqld
mysqld
0:關閉 1:關閉
2:關閉 3:關閉
4:關閉 5:啟用
6:關閉
[root@localhost ~]#
如果沒有,先添加,用chkconfig --add
mysqld
然後在3 5級别上設定服務為on
chkconfig --level 35 mysqld on
然後service start一下;
一旦你啟動了服務,可以這樣檢查伺服器是否在運作
[root@localhost ~]# ps -el | grep mysqld
4 S 0 1796 1
0 85 0 - 1513 wait
? 00:00:00 mysqld_safe
4 S 27 1856 1796 0 78 0
- 34055 -
? 00:00:00 mysqld
mysql -u {mysql-user} -p {mysql-password} -h {mysql-server}
[root@vps wwwintershanghaicom]#mysql -h localhost -u root
-p
Enter password:
Hostname: vps.hyb.com
IP Address: xx.xx.xx.xx
mysql> describe LeaseInformation;