首页 > 数据库技术 > 详细

Linux CentOS7系统 mysql 8.0.19:安装

时间:2020-04-02 18:57:17      阅读:175      评论:0      收藏:0      [点我收藏+]
前面安装教程建议参考:https://www.runoob.com/mysql/mysql-install.html
安装前准备: 删除 mysql数据库 和mariadb 自带的数据库(若有)
只说下安装后容易遇到的坑:

密码重置:

/etc/my.cnf

配置: skip-grant-tables  这样可以不输入密码进入mysql

进入mysql,首先刷新权限

flush privileges;

然后查看表结构,可以看到密码字段是authentication_string

update user set authentication_string=password(‘123456‘) where user=‘root‘;

flush privileges;

 

用户授权远程访问:

#创建账户
create user ‘root‘@‘%‘ identified by  ‘password‘
#赋予权限,with grant option这个选项表示该用户可以将自己拥有的权限授权给别人
grant all privileges on *.* to ‘root‘@‘%‘ with grant option
#改密码&授权超用户,flush privileges 命令本质上的作用是将当前user和privilige表中的用户信息/权限设置从mysql库(MySQL数据库的内置库)中提取到内存里
flush privileges;

 

mysql 客户端远程登陆:Client does not support authentication protocol requested by server ; consider upgrading MySQL client

解决方案:1升级驱动   大家可以试一下

2 修改数据库加密规则

 ALTER USER ‘root‘@‘%‘ IDENTIFIED WITH mysql_native_password BY ‘你的密码‘;

FLUSH PRIVILEGES;    

 

Linux CentOS7系统 mysql 8.0.19:安装

原文:https://www.cnblogs.com/zhaoletian/p/12620950.html

(1)
(1)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!