Binary installation MYSQL password cracking

Binary installation MySQL
[the root @ localhost ~] # the tar-XF MySQL 5.7.24-Linux-glibc2.12-x86_64.tar.gz -C / usr / local /
[the root @ localhost ~] # CD / usr / local /
[ local @ localhost the root] LN # -s-MySQL 5.7.24-Linux-glibc2.12-the x86_64 / MySQL
[the root @ localhost local] -M # the useradd -s / sbin / nologin MySQL
[MySQL the root @ localhost] # chown - MySQL R & lt: MySQL / usr / local / MySQL
[MySQL the root @ localhost] # = MySQL --basedir ./bin/mysqld --user = / usr / local / MySQL --datadir = / usr / local / MySQL / Data - -initialize
then there will be a default password, you do not need him
the following simulated default password forgot how to do? (Crack)
[root @ localhost ~] # systemctl STOP mysqld
[root @ localhost ~] # PS the AUX | grep mysqld
mysqld_safe --skip-Grant-the Tables &
mysql
enter mysql
modify the password
mysql> show databases;
mysql> use mysql
mysql> show tables;
mysql> desc user;
mysql> select user,authentication_string from user;
mysql> update user set authentication_string=PASSWORD('123456') where user='root';
mysql> flush privileges;
mysql> exit

 

Guess you like

Origin www.cnblogs.com/123456likun/p/11532832.html