MySQL Error #1133 - Can't find any matching row in the user table

后端 未结 9 969
时光说笑
时光说笑 2020-12-08 04:06

Unable to set password for a user using 3.5.2.2 - phpMyAdmin for 5.5.27 - MySQL. When trying to set the password while logged onto ph

相关标签:
9条回答
  • 2020-12-08 04:27

    I encountered this error using MySQL in a different context (not within phpMyAdmin). GRANT and SET PASSWORD commands failed on a particular existing user, who was listed in the mysql.user table. In my case, it was fixed by running

    FLUSH PRIVILEGES;
    

    The documentation for this command says

    Reloads the privileges from the grant tables in the mysql database.

    The server caches information in memory as a result of GRANT and CREATE USER statements. This memory is not released by the corresponding REVOKE and DROP USER statements, so for a server that executes many instances of the statements that cause caching, there will be an increase in memory use. This cached memory can be freed with FLUSH PRIVILEGES.

    Apparently the user table cache had reached an inconsistent state, causing this weird error message. More information is available here.

    0 讨论(0)
  • 2020-12-08 04:35

    I encountered this issue, but in my case the password for the 'phpmyadmin' user did not match the contents of /etc/phpmyadmin/config-db.php

    Once I updated the password for the 'phpmyadmin' user the error went away.

    These are the steps I took:

    1. Log in to mysql as root: mysql -uroot -pYOUR_ROOT_PASS
    2. Change to the 'mysql' db: use mysql;
    3. Update the password for the 'phpmyadmin' user: UPDATE mysql.user SET Password=PASSWORD('YOUR_PASS_HERE') WHERE User='phpmyadmin' AND Host='localhost';
    4. Flush privileges: FLUSH PRIVILEGES;

    DONE!! It worked for me.

    0 讨论(0)
  • 2020-12-08 04:36

    In my case I had just renamed the Mysql user which was going to change his password on a gui based db tool (DbVisualizer). The terminal in which I tried to 'SET PASSWORD' did not work(MySQL Error #1133).

    However this answer worked for me, even after changing the password the 'SET PASSWORD' command did not work yet.

    After closing the terminal and opening new one the command worked very well.

    0 讨论(0)
提交回复
热议问题