用正确的方式去关闭mariadb!

时间:2017-01-03 17:29:09   收藏:0   阅读:2854

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

[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

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!