wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
rpm -ivh mysql57-community-release-el7-8.noarch.rpm
yum -y install mysql-server
grep “temporary password” /var/log/mysqld.log
rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
/etc/my.cnf
skip-grant-tables
systemctl start mysqld
ALTER USER 'root'@'localhost' IDENTIFIED BY '新密码'; # 大小写无所谓,都行!
# mysql 密码修改不成功
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
set global validate_password_policy=LOW;
SHOW VARIABLES LIKE ‘validate_password%’;
mysql> show variables like 'validate_password%';
+--------------------------------------+--------+
| Variable_name | Value |
+--------------------------------------+--------+
| validate_password_check_user_name | OFF |
| validate_password_dictionary_file | |
| validate_password_length | 8 |
| validate_password_mixed_case_count | 1 |
| validate_password_number_count | 1 |
| validate_password_policy | MEDIUM |
| validate_password_special_char_count | 1 |
+--------------------------------------+--------+
#新建
create database cms character set utf8;
#授权
grant all privileges on cms.* to ‘cms’@‘%’ identified by 'cms';
FLUSH PRIVILEGES;
mysql yum 安装
于 2022-04-19 20:54:37 首次发布