MySQL8.0.11安装总结

安装环境:

CAT /etc/os-release 查看centos系统版本信息;

getconf LONG_BIT 获取惭怍系统位数

系统为 64位 centos 7

配置安装源:

rpm -Uvh https://repo.mysql.com/mysql57-community-release-el7-11.noarch.rpm

yum --enablerepo=mysql80-community install mysql-community-server

启动mysql服务

systemctl start mysqld.service

或者

service  mysqld start

mysql 服务状态:

systemctl  status mysqld

或者

service mysqld status 实际上也是会转换为systemctl  status mysqld去获取状态

查看mysql root 临时密码


grep "A temporary password" /var/log/mysqld.log

根据临时密码重置新密码和密码策略

mysql_secure_installation ;

Password Policy:

按照提示步骤一步步完成;

设置可以远程连接

firewall-cmd --add-port=3306/tcp --permanent   开放数据库访问端口 tcp 协议

firewall-cmd --reload    重新加载防火墙信息

firewall-cmd --list-ports  查看开放的端口信息

lsof -i:3306 验证


mysql 客户端登录验证

查看版本:

有的客户端连接会出现 error 2059错误

主要解决方案:


更改default_authentication_plugin = mysql_native_password

vim /etc/my.cnf

重启服务就可以连接了;有可能没有重启成功;(如果不行 应该为1045,可能操作系统默认连接为127.0.0.1,不是localhost导致连接不上,更改用户Host

use  mysql; update user set Host='%' where User='root';windows 客户端连接时出现, 这种应该和 error 2059: Authentication plugin 'caching_sha2_password' can not be loaded '----' 无关  );


安装的时候可以明显感觉到MySQL8.0 新特性 安全属性提高非常多;


猜你喜欢

转载自blog.csdn.net/qwerdf10010/article/details/80049642