zoukankan      html  css  js  c++  java
  • mysql 8 设置大小写不敏感

    1. 停业务服务。
    2. 备份数据
    3. 停库
    # systemctl stop mysqld
    
    1. 修改配置

    2. 删文件:

    # rm /var/lib/mysql/* -rf
    
    1. 启动:
    # systemctl start mysqld
    
    1. 设置密码等级
    mysql> set global validate_password.policy=0;  
    Query OK, 0 rows affected (0.00 sec)
    
    mysql> set global validate_password.length=1;
    Query OK, 0 rows affected (0.00 sec)
    
    1. 修改密码
    mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY '密码';
    Query OK, 0 rows affected (0.00 sec)
    
    1. 设置root远程访问
    mysql> use mysql;
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    
    Database changed
    mysql> select host,user from user;
    +-----------+------------------+
    | host      | user             |
    +-----------+------------------+
    | localhost | mysql.infoschema |
    | localhost | mysql.session    |
    | localhost | mysql.sys        |
    | localhost | root             |
    +-----------+------------------+
    4 rows in set (0.00 sec)
    
    mysql> update user set host='%' where user='root';
    Query OK, 1 row affected (0.00 sec)
    Rows matched: 1  Changed: 1  Warnings: 0
    
    mysql> select host,user from user;
    +-----------+------------------+
    | host      | user             |
    +-----------+------------------+
    | %         | root             |
    | localhost | mysql.infoschema |
    | localhost | mysql.session    |
    | localhost | mysql.sys        |
    +-----------+------------------+
    4 rows in set (0.00 sec)
    mysql> ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '密码';
    Query OK, 0 rows affected (0.00 sec)
    mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
    Query OK, 0 rows affected (0.01 sec)
    mysql>  flush privileges;
    Query OK, 0 rows affected (0.00 sec)
    

    10.查看大小写敏感

    11. 重启数据库

    systemctl restart mysqld

    12.创建库名称

    1. 导入数据
  • 相关阅读:
    决策树
    minStack及tree学习
    待解决
    前端开发之弹出框系列教程四:Prompt提示输入框
    前端开发之弹出框系列教程三:Msg消息框
    前端开发之弹出框系列教程二:Confirm确认框
    前端开发之弹出框系列教程一:Alert提示框
    制作弹出框系列教程2--遮罩层
    制作弹出框系列教程1--效果预览
    offset client scroll
  • 原文地址:https://www.cnblogs.com/zoujiaojiao/p/12705459.html
Copyright © 2011-2022 走看看