linux 环境下安装 MySQL
参考:
Linux安装MySQL5.7
mysql5.7.35下载 如果下载速度比较慢,采用下载
注意:
安装后
1. 修改密码
set password for 用户名@localhost = password('新密码');
flush privileges;
2. 出现 navicat MySQL连接Linux下MySQL的及2003错误 需要看下 虚拟机的防火墙是否关闭!!!
3. navicat 连接MySQL,出现 1130
use mysql;
update user set host='%' where user = 'root';
flush privileges;
4. navicate 链接MySQL,出现1251
alter user 'root'@'%' identified with mysql_native_password by 'your password';
flush privileges;
ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;
4. 修改密码 : set password for root@localhost = password('新密码');
CentOs7 安装mysql-8.0.12出现的问题
1. navicat 连接出现的问题
ERROR 1396 (HY000): Operation ALTER USER failed for 'root'@'localhost'