1、Linux CentOS一般作为服务器使用,因此,MySQL服务器应该随机自启动。查看开机自启动的服务使用chkconfig命令,如下: #chkconfig --list 或是只查看MySQL服务 #chkconfig --list mysqld 2、配置MySQL的开机自动启动 chkconfig --add mysql chkconfig mysqld on 3、命令启动/关闭MySQL实例 service mysqld start/stop /etc/init.d/mysqld start/stop systemctl start/stop mysqld 4、命令关闭MySQL mysqladmin -p -u root shutdown 5、检查mysql是否真正的启动 方法一:查询端口 #netstat -nutpl 方法二:查询进程 ps -ef | grep mysqld