Linux start and stop and restart Mysql database of recommends an easy way

  • 2020-05-12 06:40:20
  • OfStack

1. View the mysql version

Method 1: status;
Method 2: select version();

2. Mysql starts, stops and restarts common commands

a, startup mode
1. Start with service:
[root @localhost /]# service mysqld start (version 5.0 is mysqld)
[root @szxdb etc]# service mysql start (version 5.5.7 is mysql)

2. Start with mysqld script:

/etc/inint.d/mysqld start

3. Start with safe_mysqld:

safe_mysqld&

b, stop,

1. Start with service:
service mysqld stop

2. Start with mysqld script:

/etc/inint.d/mysqld stop

3, mysqladmin shutdown

c, restart

1. Start with service:
service mysqld restart
service mysql restart (version 5.5.7 command)

2. Start with mysqld script:

/etc/init.d/mysqld restart


Related articles: