Column count of mysql.user is wrong. Expected 42, found 44. The table is probably corrupted

06/05/2020 603

Hướng dẫn fix lỗi khi tạo database trên mysql

Column count of mysql.user is wrong. Expected 42, found 44. The table is probably corrupted

 Các bạn chạy lệnh sau để upgrade mysql để fix lỗi nhé

mysql_upgrade -uroot -p***

Hệ thống sẽ trả về như sau

Checking if update is needed.
Checking server version.
Running queries to upgrade MySQL server.
Checking system database.
mysql.columns_priv                                 OK
mysql.db                                           OK
mysql.engine_cost                                  OK
mysql.event                                        OK
mysql.func                                         OK
mysql.general_log                                  OK
mysql.user                                         OK
Upgrading the sys schema.
Checking databases.
[...]
Upgrade process completed successfully.
Checking if update is needed.

Chúc các bạn thành công.