一、linux下查看mysql服务的两种方法:
1.[root@localhostbin]ps -ef|grepmysql
2.[root@localhostbin]netstat -nlp
二、linux下启动mysql服务的两种方法
1.命令行方式:
[root@localhostbin]cd /usr/bin
[root@localhostbin]./mysqld_safe &
systemctl start mysqld.service
2.服务方式:
[root@localhost~]service mysql start
systemctl start mysqld.service
如果服务在启动状态,直接重启服务用以下命令:
[root@localhost~]service mysql restart
systemctl restart mysqld.service
三、linux下关闭mysql服务的两种方法:
命令行方式:
[root@localhost~]mysqladmin -u rootshutdown
服务方式:
[root@localhost~]service mysql stop
systemctl stop mysqld.service