用正确的方式去关闭数据库!
1
2
3
4
5
6
7
8
9
|
[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'.
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
[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 51CTO博客,原文链接:http://blog.51cto.com/roidba/1888535,如需转载请自行联系原作者