27 using Mysqladmin to close a database
mysqladmin-uroot-poldboy123 shutdown
Ps-ef |grep MySQL
MySQL forgot password re-modify password process:
mysql> mysqld_safe--skip-grant-tables--user=mysql--defaults-file=/data/3306/my.cnf >/dev/null &
Mysqld_safe--skip-grant-tables--user=mysql >/dev/null &
-Update Mysql.user Set Password=password ("oldboy111") where user= ' root ' and host= ' localhost ';
Error 1064 (42000): You have a error in your SQL syntax; Check the manual that corresponds to your MySQL server version for the right syntax to use near ' Mysqld_safe--skip-grant- Tables--user=mysql--defaults-file=/data/3306/my.cnf > ' at line 1
mysql> Update Mysql.user Set Password=password ("oldboy111") where user= ' root ' and host= ' localhost ';
Query OK, 1 row affected (0.35 sec)
Rows matched:1 changed:1 warnings:0
Mysql> Terminated
Here, re-open a window to kill MySQL Note! Do not use kill-9 brutally kill MySQL, this will cause the database to lose data consequences will be very serious
Ill MySQL
[[email protected] ~]# Pkill MySQL
[[email protected] ~]# Pkill MySQL
[[email protected] ~]# Pkill MySQL
[[email protected] ~]# Pkill MySQL
[[email protected] ~]# Pkill MySQL
[[email protected] ~]# Pkill MySQL
[[email protected] ~]# Pkill MySQL
[[email protected] ~]# /etc/init.d/mysqld start
Starting MySQL .... success!
[Email protected] ~]# Ps-ef | grep MySQL
Root 10974 1 0 18:39 pts/2 00:00:00/bin/sh/application/mysql/bin/mysqld_safe--datadir=/application/mysql/ Data--pid-file=/application/mysql/data/root.pid
MySQL 11148 10974 3 18:39 pts/2 00:00:00/application/mysql/bin/mysqld--basedir=/application/mysql--datadir=/ap Plication/mysql/data--plugin-dir=/application/mysql/lib/plugin--user=mysql--log-error=/application/mysql/data/ Root.err--pid-file=/application/mysql/data/root.pid
Root 11181 10136 0 18:39 pts/2 00:00:00 grep mysql
[Email protected] ~]# mysql-uroot-poldboy111
Warning:using a password on the command line interface can is insecure.
Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 4
Server Version:5.6.34-log MySQL Community Server (GPL)
Copyright (c), Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of the Oracle Corporation and/or its
Affiliates. Other names trademarks of their respective
Owners.
Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.
Mysql> \q
Bye
[Email protected] ~]# mysql-uroot-poldboy111
Warning:using a password on the command line interface can is insecure.
Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 6
Server Version:5.6.34-log MySQL Community Server (GPL)
Copyright (c), Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of the Oracle Corporation and/or its
Affiliates. Other names trademarks of their respective
Owners.
Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.
Mysql>
This article from "Xiao Xin" blog, reproduced please contact the author!
MySQL Database base command end