码迷,mamicode.com
首页 > 数据库 > 详细

5.mysql8.0安装遇到的问题

时间:2019-04-12 13:17:47      阅读:192      评论:0      收藏:0      [点我收藏+]

标签:ora   ffffff   删除   MySQL8.0   重启   rar   密码   5.7   存在   

1.官网下载mysql-8.0.15-1.el7.x86_64.rpm-bundle.tar,解压到  /usr/local/mysql/  目录下;

2.依次安装mysql组件:

# rpm -ivh mysql-community-common-8.0.15-1.el7.x86_64.rpm

# rpm -ivh mysql-community-libs-8.0.15-1.el7.x86_64.rpm

# rpm -ivh mysql-community-libs-compat-8.0.15-1.el7.x86_64.rpm

# rpm -ivh mysql-community-client-8.0.15-1.el7.x86_64.rpm

# rpm -ivh mysql-community-server-8.0.15-1.el7.x86_64.rpm

如果有报错如:

依赖检测失败:

mysql-community-common(x86-64) >= 5.7.9 被 mysql-community-libs-5.7.19-1.el7.x86_64 需要
mariadb-libs 被 mysql-community-libs-5.7.19-1.el7.x86_64 取代

则表示该依赖已存在,则删除以前依赖,重新安装,删除命令为:

# rpm -e mysql-libs

3.启动服务:

# systemctl start mysqld.service

查看状态:

# systemctl status mysqld.service

4.修改密码:

  5.7版本以后,安装mysql后默认生成密码,密码在/var/log/mysqld.log文件中,

  命令搜索:#grep ‘temporary password‘  mysqld.log

  然后登陆:#mysql -uroot -p

  输入密码后,进入mysql,修改密码:

    mysql> use mysql;

    mysql> alter user ‘root‘@‘%‘  identified by ‘password_123‘;

    mysql> exit;

4.navicat连接测试:

  正确输入连接信息后,可能会出现一下问题:

  (1)error 1130-host ‘192.168.*.*’ is not allowed to connect to this MySql server.

    解决:该mysql服务不允许远程连接。进入mysql

    mysql> use mysql;

    mysql> alter user set host=‘%‘ where user = ‘root‘;

    mysql>select host,user from user;

    mysql>flush privileges;

    mysql>exit;

  (2)error 1251 client does not support authentication protocol requested by server.

    解决:root账户默认的加密方式是caching_sha2_password;很多客户端工具不支持这种加密认证方式,连接的时候就会报这种错。

    mysql> use mysql;

    mysql> alter user ‘root‘@‘%‘ identified by ‘password_123‘ password expire never;

    mysql> alter user ‘root‘@‘%‘ identified with mysql_native_password by ‘password_123‘;

    mysql> flush privileges;

    mysql> exit;

    重启mysql服务,再次连接,成功。

 

5.mysql8.0安装遇到的问题

标签:ora   ffffff   删除   MySQL8.0   重启   rar   密码   5.7   存在   

原文地址:https://www.cnblogs.com/li-jing/p/10695394.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!