linux下Mysql的啟動(dòng)關(guān)閉的命令
MySQL是一個(gè)關(guān)系型數(shù)據(jù)庫管理系統(tǒng),由瑞典MySQL AB 公司開發(fā),目前屬于 Oracle 旗下產(chǎn)品。那么你知道linux下Mysql的啟動(dòng)關(guān)閉的命令么?接下來是小編為大家收集的linux下Mysql的啟動(dòng)關(guān)閉的命令,歡迎大家閱讀:
linux下Mysql的啟動(dòng)關(guān)閉的命令
linux下Mysql的啟動(dòng)關(guān)閉(本文基于centos6.4、mysql5.7.3),mysql安裝在/usr/local/mysql目錄下:
[root@lnmp ~]# /usr/local/mysql/bin/mysql --version
/usr/local/mysql/bin/mysql Ver 14.14 Distrib 5.7.3-m13, for Linux (x86_64) using EditLine wrapper
[root@lnmp ~]# /bin/cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld #將mysql.server拷貝到啟動(dòng)項(xiàng)
[root@lnmp ~]# /etc/init.d/mysqld start #啟動(dòng)MYSQL數(shù)據(jù)庫
Starting MySQL.... SUCCESS!
[root@lnmp ~]# netstat -tunlp|grep 3306 #查看是否開啟了mysql數(shù)據(jù)庫端口3306
tcp 0 0 :::3306 :::* LISTEN 1773/mysqld
[root@lnmp ~]# /etc/init.d/mysqld stop #停止mysql數(shù)據(jù)庫
Shutting down MySQL.. SUCCESS!
[root@lnmp ~]# netstat -tunlp|grep 3306 #查看是否關(guān)閉了mysql的默認(rèn)端口3306
[root@lnmp ~]#
備注:你可以將/usr/local/mysql/bin加入PATH中。這樣可以直接輸入mysql或者mysqladmin,不用輸入全路徑。
看了“linux下Mysql的啟動(dòng)關(guān)閉的命令”還想看:
1.Linux系統(tǒng)重啟命令和關(guān)閉命令怎么寫