Friday, September 11, 2026
Explore Technology
Connect knowledge - Elevate skills
Linux 2 min read

Lỗi service mysql không thể start:[ERROR] mysqld: Table ‘./mysql/global_priv’ is marked as crashed

admin Th11 24, 2025 0 comments
Lỗi service mysql không thể start:[ERROR] mysqld: Table ‘./mysql/global_priv’ is marked as crashed

Trạng thái lỗi:

[root@ctr979447 mysql]# systemctl status mysqld

.........

Aug 29 13:48:41 ctr979447.nhanhoa mysqld[6701]: 2025-08-29 13:48:41 0 [ERROR] mysqld: Table './mysql/global_priv' is marked as crashed and last (automatic?) repair failed
Aug 29 13:48:41 ctr979447.nhanhoa mysqld[6701]: 2025-08-29 13:48:41 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table './mysql/global_priv' is marked as crashed and last (automatic?) repair failed
Aug 29 13:48:41 ctr979447.nhanhoa mysqld[6701]: 2025-08-29 13:48:41 0 [ERROR] Aborting
Aug 29 13:48:42 ctr979447.nhanhoa systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE
Aug 29 13:48:42 ctr979447.nhanhoa systemd[1]: Failed to start MariaDB database server.
Aug 29 13:48:42 ctr979447.nhanhoa systemd[1]: Unit mariadb.service entered failed state.
Aug 29 13:48:42 ctr979447.nhanhoa systemd[1]: mariadb.service failed.

Nguyên nhân:

Lỗi do bảng mysql.global_privbị crash (hỏng). Đây là bảng chứa thông tin quyền truy cập (user, password, grant), nên nếu nó lỗi thì mysql không thể khởi động.

Cách xử lý:

SSH vào VPS thao tác các bước sau:

vi /etc/my.cnf thêm vào cuối cùng dòng:

skip-grant-tables

Khởi động lại mysql

systemctl restart mysqld

Đăng nhập vào mysql:

[root@ctr979447 mysql]# mysql
MariaDB [(none)]> USE mysql;
MariaDB [mysql]> REPAIR TABLE global_priv;

Xóa cấu hình skip-grant-tables

Mở lại file /etc/my.cnf xóa bỏ dòng skip-grant-tables

Khởi động lại mysql

systemctl restart mysqld

Sau khi restart dịch vụ hoạt động lại bình thường.

admin

Technical author & IT enthusiast at systemzone.top.

Latest Tech Posts

Fresh updates from systemzone.top
All Posts
0 0 đánh giá
Đánh giá bài viết
Theo dõi
Thông báo của
guest
0 Góp ý
Cũ nhất
Mới nhất Được bỏ phiếu nhiều nhất

Fast Updates

Latest & breaking tech news

Quality Content

Verified & carefully curated

Community

Learn, share and grow together

Always Connected

Empowering developers & tech enthusiasts

0
Rất thích suy nghĩ của bạn, hãy bình luận.x