MySQL unknown column 'password_last_changed'

后端 未结 1 1456
谎友^
谎友^ 2021-02-07 00:28

When creating a user using this command:

create user \'foo\'@localhost\';

this error is shown:

ERROR 1054 (42S22): Unkno

相关标签:
1条回答
  • 2021-02-07 00:55

    Apparently you upgraded your MySQL to 5.7 from an earlier version.

    Column 'password_last_changed' used to exist in MySQL <5.7, but was removed since 5.7

    If this is the case, you have to run 'mysql_upgrade' script to migrate some tables from the old version to the new one.

    run

    mysql_upgrade -u root -p
    

    and enter your root password.

    then you should have your problem solved

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