zoukankan      html  css  js  c++  java
  • Linux CentOS7系统 mysql 8.0.19:安装

    前面安装教程建议参考: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 免密登录
    mysql 重置从库
    elasticsearch原理及简介
    多线程编程--心得
    为什么我们做分布式使用Redis?
    JAVA-JVM调优
    JAVA-JVM调优标志
    Spirng-Mvc之Servlet篇
    Agent Job代理 执行SSIS Package
    Python之爬虫的理解
  • 原文地址:https://www.cnblogs.com/zhaoletian/p/12620950.html
Copyright © 2011-2022 走看看