Linux平台下启动和关闭mysql服务

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

方式一:

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

1

方式二:

[root@localhost bin]netstat -nlp

1

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

命令行方式:

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

1
2

服务方式:

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

1
2
3

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

扫描二维码关注公众号,回复: 2516001 查看本文章

命令行方式:

[root@localhost ~]mysqladmin -u root shutdown

1

服务方式:

[root@localhost ~]service mysql stop

1

原博客地址: http://blog.csdn.net/king_1421484363/article/details/73277771

猜你喜欢

转载自blog.csdn.net/yueaini10000/article/details/79536704