The following column linux system tutorial will introduce to you how to view, start and close mysql in Linux. I hope it will be helpful to friends in need!
1. Two ways to view the mysql service under Linux:
Method one:
[root@localhost bin]ps -ef|grep mysql
Method two:
[root@localhost bin]netstat -nlp
2. Two ways to start the mysql service under Linux:
Command line mode:
[root@localhost bin]cd /usr/bin [root@localhost bin]./mysqld_safe &
Service mode:
[root@localhost ~]service mysql start
If the service is in the starting state , directly restart the service with the following command:
[root@localhost ~]service mysql restart
3. Two ways to close the mysql service under Linux:
Command line method:
[root@localhost ~]mysqladmin -u root shutdown
Service method:
[root@localhost ~]service mysql stop
Recommended learning: "linux video tutorial"
The above is the detailed content of Two ways to view, start and shut down mysql in linux. For more information, please follow other related articles on the PHP Chinese website!