• 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. 导入数据
  • 相关阅读:
    Pytorch使用tensorboardX实现loss曲线可视化。超详细!!!
    numpy安装失败:numpy和cv2的版本不一样吧 pip安装/卸载
    问题解决:RuntimeError: CUDA out of memory.(....; 5.83 GiB reserved in total by PyTorch)
    前端刷题网站
    vscode如何使用ssh连接远程linux
    marginnote使用
    前端知识点
    HTTP状态码
    内置对象总结
    微信小程序
  • 原文地址:https://www.cnblogs.com/zoujiaojiao/p/12705459.html
Copyright © 2020-2023  润新知