美文网首页
mariadb10 忘记密码

mariadb10 忘记密码

作者: 明翼 | 来源:发表于2021-11-18 15:49 被阅读0次

    skip-grant-tables
    启动,登录更改密码,记得先要privileges

    MariaDB [(none)]> 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
    MariaDB [mysql]> SET PASSWORD FOR 'root'@localhost = PASSWORD("");
    ERROR 1290 (HY000): The MariaDB server is running with the --skip-grant-tables option so it cannot execute this statement
    MariaDB [mysql]> flush privileges;
    Query OK, 0 rows affected (0.023 sec)

    MariaDB [mysql]> SET PASSWORD FOR 'root'@localhost = PASSWORD("root1234");
    Query OK, 0 rows affected (0.000 sec)

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

    MariaDB [mysql]> quit

    相关文章

      网友评论

          本文标题:mariadb10 忘记密码

          本文链接:https://www.haomeiwen.com/subject/bjadtrtx.html