当前位置:Gxlcms > 数据库问题 > 5.mysql8.0安装遇到的问题

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

时间:2021-07-01 10:21:17 帮助过:25人阅读

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   存在   

人气教程排行