MySQL optimization-MySQL server optimization and password cracking

Mysql server optimization:

1. Four character set questions (my.ini)
set three

default-character-set=utf8  #建议连接字符集改为utf8
character-set-server=utf8 #设置服务器字符集
collation-server=utf8_general_ci #校验字符集

2. Slow log slow query log problem
3. Root password is lost

mysql root password cracking:

1. The password is not forgotten, but I want to change it

set password=password('123');

2. The password is forgotten, I want to crack the password

1) Close the mysql service

net stop mysql57

2) Start mysql over the user table
a. Start the mysql parent process over the authorization table

cd AppServ\MySQL\bin
mysqld.exe --skip-grant-tables &

b. Login without password

mysql -uroot 

c. Refresh administrator permissions

flush privileges;

d. Change the password after having permission

alter user 'root'@'localhost' identified by '789';

3) Close the mysqld process in the task manager under win

4) Restart the mysql service

net start mysql57

Guess you like

Origin blog.csdn.net/weixin_39218464/article/details/112124814