systemctl status mysqld
? ? systemctl stop mysqld
? ? systemctl start mysqld
? ? systemctl restart mysqld ?
? ? systemctl enable mysqld
? ? systemctl disable mysqld
cat /var/log/mysqld.log | grep ERROR
grep "password" /var/log/mysqld.log
mysql -uroot -p
? ? set global validate_password_policy=LOW;
? ? set global validate_password_length=17;
alter user 'root'@'localhost' identified by '0123456789_123456';
新增 skip_grant_tables
vim ?/etc/my.conf
? ? systemctl restart mysqld ?
mysql -uroot -p
不用输入密码 直接回车
? ? use mysql;
? ? update user set authentication_string= password("root") where user='root';
重启? ? systemctl restart mysqld ?