Linux common commands in mysql services

Set service password mysql

1 . Enter mysql services: -uroot-mysql - P
 2 selected mysql database:. Use mysql;
 . 3 set a password Test: User UPADTE. SET password = PASSWORD ( ' Test ' ) the WHERE User = ' the root ' ;
 . 4 exit mysql service. : Exit;
 5 to restart the mysql service:. service mysqld restart;

 

Restart mysql service
service mysqld restart

 

Mysql stop service
service mysqld stop

 

Start mysql service
service mysqld start


Login native mysql database
mysql -uroot -p
password

 

View mysql running state
service mysqld status 

 

View mysql process running using
ps -e | grep mysql

Guess you like

Origin www.cnblogs.com/zhizou/p/11368724.html