CentOS7安装MySQL5.7
环境:CentOS7和 mysql-5.7.26-1.el7.x86_64.rpm-bundle.tar
MySQL下载地址 https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.26-1.el7.x86_64.rpm-bundle.tar
参考:https://blog.csdn.net/sevenkoala/article/details/76163853
https://blog.csdn.net/qq_23123177/article/details/82759057
1)下载解压
2)卸载自带的MySQL rpm -qa|grep mariadb rpm -e mariadb-libs-5.5.56-2.el7.x86_64 --nodeps 然后启动安装
3)修改MySQL默认的密码设置策略 https://www.cnblogs.com/birdman-oscar/p/9804708.html
set global validate_password_policy=0;
set global validate_password_length=4;
set password for root@localhost = password('root');
环境:CentOS7下MySQL5.7
启动 systemctl start mysqld
停止 systemctl stop mysqld
查看 ps -ef | grep mysql
4)授权远程登录
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;
https://www.cnblogs.com/yybrhr/p/9810375.html
https://www.cnblogs.com/hello-/articles/9061836.html
CentOS6 安装MySQL5.7大坑,报
libc.so.6(GLIBC_2.14)(64bit) is needed by mysql-community-libs-5.7.26-1.el7.x86_64错误,网上各种方法尝试解决无效,突然意识到自己一直在CentOS7上安装MySQL,在CentOS6上使用同样的方法肯定不行的,遂百度CentOS6.8安装MySQL5.7发现了一篇文章,自己以前简直浪费时间 https://blog.csdn.net/YHF886/article/details/82190688
set password for root@localhost = password('fSmJ3y$2Bd!83H2@H');
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'fSmJ3y$2Bd!83H2@H' WITH GRANT OPTION;
-- 查看MySQL初始的密码策略
SHOW VARIABLES LIKE 'validate_password%';
-- 设置密码的验证强度等级
set global validate_password_policy=LOW;
-- 设置密码长度
set global validate_password_length=6;
参考:https://blog.csdn.net/hello_world_qwp/article/details/79551789