• 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]#

  • 相关阅读:
    将 ONLYOFFICE 文档编辑器与 С# 群件平台集成
    APS智能排产助力啤酒行业实施“利润优先”策略
    基于JAVA临港新片区招商引资项目管理系统计算机毕业设计源码+数据库+lw文档+系统+部署
    工作几年还是悟不懂自动化测试的意义
    从键盘输入4个整数,输出其中的最大数和次大数(或从大到小依次输出)
    可视化大屏的互动潜力:交互功能一览
    自定义View之Measure(二)
    Elasticvue - 用于浏览器的免费开源 Elasticsearch GUI
    Overleaf能使用自己系统中的字体嘛?
    Python基于CycleGAN&pix2pix的黑白图像AI上色(源码&部署教程)
  • 原文地址:https://blog.csdn.net/weixin_43475880/article/details/127249397