用正确的方式去关闭mariadb!

用正确的方式去关闭数据库!

[root@mysql91 ~]# netstat -ntlp|grep mysql
tcp        0      0 :::3306                     :::*                        LISTEN      4305/mysqld         
方法一、
[root@mysql91 ~]# mysqladmin -uroot -p shutdown
Enter password: 
[1]+  Done                    mysqld_safe --defaults-file=/etc/my.cnf --numa-interleave
[root@mysql91 ~]# mysqld_safe --defaults-file=/etc/my.cnf --numa-interleave &
[1] 4532
[root@mysql91 ~]# 170103 19:26:26 mysqld_safe Logging to ‘/log/mysql/error.log‘.
[root@mysql91 ~]# mysql -uroot -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 10.1.20-MariaDB MariaDB Server
Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.
方法二、
MariaDB [(none)]> shutdown;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> exit
Bye
[1]+  Done                    mysqld_safe --defaults-file=/etc/my.cnf --numa-interleave
[root@mysql91 ~]# netstat -ntlp|grep mysql


本文出自 “roidba” 博客,请务必保留此出处http://roidba.blog.51cto.com/12318731/1888535

文章来自:http://roidba.blog.51cto.com/12318731/1888535
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3