linux下Mysql的启动关闭的命令
2019/10/10/17:46:40 阅读:1991 来源:谷歌SEO算法 标签:
搜索引擎
下面我来为各位介绍linux下Mysql的启动关闭的命令,有需要了解的朋友不防进入看看吧,linux下Mysql的启动关闭(本文基于centos6.4、mysql5.7.3),mysql安装在/usr/local/mysql目录下:
- [root@lnmp~]#/usr/local/mysql/bin/mysql--version
- /usr/local/mysql/bin/mysqlVer14.14Distrib5.7.3-m13,forLinux(x86_64)usingEditLinewrapper
- [root@lnmp~]#/bin/cp/usr/local/mysql/support-files/mysql.server/etc/init.d/mysqld#将mysql.server拷贝到启动项
- [root@lnmp~]#/etc/init.d/mysqldstart#启动MYSQL数据库
- StartingMySQL....SUCCESS!--phpfensi.com
- [root@lnmp~]#netstat-tunlp|grep3306#查看是否开启了mysql数据库端口3306
- tcp00:::3306:::*LISTEN1773/mysqld
- [root@lnmp~]#/etc/init.d/mysqldstop#停止mysql数据库
- ShuttingdownMySQL..SUCCESS!
- [root@lnmp~]#netstat-tunlp|grep3306#查看是否关闭了mysql的默认端口3306
- [root@lnmp~]#
备注:你可以将/usr/local/mysql/bin加入PATH中,这样可以直接输入mysql或者mysqladmin,不用输入全路径.
热门评论