linux mysql的启动和停止

一、linux下查看mysql服务的两种方式:

[root@localhost bin]ps -ef|grep mysql
[root@localhost bin]netstat -nlp

linux下启动mysql服务的两种方式

命令行方式:

[root@localhost bin]cd /usr/sbin
[root@localhost bin]./mysqld_safe &

服务方式:

[root@localhost ~]service mysql start
如果服务在启动状态,直接重启服务用以下命令:
[root@localhost ~]service mysql restart

linux下关闭mysql服务的两种方式

命令行方式:

[root@localhost ~]mysqladmin -u root shutdown

 服务方式:

[root@localhost ~]service mysql stop

猜你喜欢

转载自liuna718-163-com.iteye.com/blog/2414357