• mysql 5.7登陆简单密码问题


    lucifer [mysql]>update user set authentication_string=password('mysql') where user='root';
    Query OK, 1 row affected, 1 warning (0.00 sec)
    Rows matched: 1  Changed: 1  Warnings: 1

    lucifer [mysql]>flush privileges;
    Query OK, 0 rows affected (0.00 sec)

    lucifer [mysql]>quit;
    Bye
    [root@mysql1 bin]# mysql -uroot -pmysql
    mysql: [Warning] Using a password on the command line interface can be insecure.
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 7
    Server version: 5.7.20

    Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.

    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

    lucifer [(none)]>show database;
    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'database' at line 1
    lucifer [(none)]>
    lucifer [(none)]>
    lucifer [(none)]>
    lucifer [(none)]>show databases;
    ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
    lucifer [(none)]>
    lucifer [(none)]>
    lucifer [(none)]>
    lucifer [(none)]>exit
    Bye
    [root@mysql1 bin]#
    [root@mysql1 bin]#
    [root@mysql1 bin]#
    [root@mysql1 bin]# mysql -uroot -pmysql
    mysql: [Warning] Using a password on the command line interface can be insecure.
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 8
    Server version: 5.7.20

    Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.

    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

    lucifer [(none)]>
    lucifer [(none)]>show databases;
    ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
    lucifer [(none)]>
    lucifer [(none)]>
    lucifer [(none)]>set global validate_password_policy=0;
    ERROR 1193 (HY000): Unknown system variable 'validate_password_policy'
    lucifer [(none)]>
    lucifer [(none)]>
    lucifer [(none)]>set global validate_password_length=1;
    ERROR 1193 (HY000): Unknown system variable 'validate_password_length'
    lucifer [(none)]>
    lucifer [(none)]>
    lucifer [(none)]>set global validate_password_policy=LOW;
    ERROR 1193 (HY000): Unknown system variable 'validate_password_policy'
    lucifer [(none)]>
    lucifer [(none)]>
    lucifer [(none)]>FLUSH PRIVILEGES;
    ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
    lucifer [(none)]>SHOW VARIABLES LIKE 'validate_password%';
    ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
    lucifer [(none)]>update user set authentication_string=password('Monk324ey') where user='root';
    ERROR 1046 (3D000): No database selected
    lucifer [(none)]>
    lucifer [(none)]>
    lucifer [(none)]>use mysql
    ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
    lucifer [(none)]>
    lucifer [(none)]>
    lucifer [(none)]>use mysql
    ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
    lucifer [(none)]>>update user set authentication_string=password('Monk324ey') where user='root';
    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '>update user set authentication_string=password('Monk324ey') where user='root'' at line 1
    lucifer [(none)]>
    lucifer [(none)]>
    lucifer [(none)]>
    lucifer [(none)]>
    lucifer [(none)]>
    lucifer [(none)]>set password=password('QAZwsx123');
    Query OK, 0 rows affected, 1 warning (0.01 sec)

    lucifer [(none)]>
    lucifer [(none)]>exit
    Bye
    [root@mysql1 bin]#

  • 相关阅读:
    中国本土Tier1加速崛起,这家ADAS厂商如何在多赛道领跑?
    Socket通信
    MVO-CNN-BiLSTM多输入时序预测|多元宇宙优化算法-卷积-双向长短期神经网络时序预测(Matlab)
    单线程Jedis管道实现批量写入数据
    lua-总结2
    7.spark sql编程
    web3相关教程资讯集锦
    TiDB 6.1 部署本地测试集群(支持 macOS 和 Linux)
    bpftrace:简便输出调试信息
    spring session 导致 HttpSessionListener 失效
  • 原文地址:https://blog.csdn.net/weixin_43475880/article/details/127249397