Fix can't create/write to file '/home/*****/logs/mysql.log

Fix can't create/write to file '/home/*****/logs/mysql.log

Bởi 22 tháng 07, 2024 - 04:55 (GMT +07)

Với một số trường hợp khởi động cứng VPS trong khi website vẫn chạy thường sẽ gặp lỗi này, không thể ghi dữ liệu vào file mysql.log

/tmp/startmysql: line 1: systemctl: command not found Starting MySQL.170812 01:56:32 mysqld_safe Logging to '/home/****/logs/mysql.log'. 170812 01:56:32 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql /usr/bin/mysqld_safe_helper: Can't create/write to file '/home/****/logs/mysql.log' (Errcode: 13 "Permission denied") ERROR!

File .log bạn có thể xóa mà không ảnh hưởng tới server. 

Có 2 cách sửa 1 là phân lại quyền hai là xóa nó đi rồi để hệ thống tạo lại. 

Mình sẽ truy cập /home/*****/logs/ và xóa file mysql.log 

Sau đó khởi động lại server, mọi thứ hoạt động bình thường..

Bình luận

3 Bình luận

W
Binh WP

Mình thử rồi mà không được. Starting MariaDB.190527 04:35:26 mysqld_safe Logging to '/home/.../logs/mysql.log'. 190527 04:35:26 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql/ /usr/bin/mysqld_safe_helper: Can't create/write to file '/home/.../logs/mysql.log' (Errcode: 13) /etc/init.d/mysql: line 265: kill: (11227) - No such process ERROR! Có phải sửa permision thành gì không nhỉ?

Trả lời
11:37 27/05/2019
L
Luqman

I come to this page when i almost frustrating with mysql on my vps where did not want to restart. Now my vps is normal after following your suggestion to delete mysql.log file Thank you, Thank you, Thank you so much for your sharing, and keep on sharing your knowledge. Regards. Luqman from Indonesia.

Trả lời
22:56 15/08/2017
Popup image default

Thông báo