June 22, 2015

MySQL Table says IN USE, but table will not repair in phpmyadmin.



From time to time mysql corrupts itself.  This can normally be fixed using the KB Article here: http://billing.handsonwebhosting.com/knowledgebase.php?action=displayarticle&id=194
Under some situations however, no matter how many times you run a REPAIR on the table, the table still returns IN USE and what's worse is that the system says the table is "already up to date".
If you have shell access, here's what to do;

cd /var/lib/mysql/DATABASE  (where DATABASE is the one you're trying to fix)

myisamchk --safe-recover TABLE  (where TABLE is the table you are tring to fix)

This will will repair the table in safemode, and SHOULD result in success.

Related Posts:

  • Tổng hợp các lệnh thường dùng để quản trị MySQL1. Vị trí các tập tin CSDL:/var/lib/mysql2. Quản lý các tài khoản user và database admin:Lưu ý: Trước khi thực hiện các câu lệnh bên dưới bạn cần phải đăng nhập vào MySQL bằng tài khoản quản trị (root).Hiển thị tất cả tài kho… Read More
  • PHP/Mysql compatibility - PDO::__construct(): authentication method unknownIf you are getting this error during DAP livelinks activation:Warning: PDO::__construct(): The server requested authentication method unknown to the client [mysql_old_password] inThis indicates a php version incompatibility w… Read More
  • Hướng dẫn reset password root MySQL 1. Giới thiệu:Bài viết này sẽ hướng dẫn cách thực hiện reset password root MySQL theo từng bước cụ thể.2. Các bước thực hiện: Bước 1: Stop dịch vụ MySQL #/etc/init.d/mysqld stop Bước 2: Start dịch vụ MySQL # mysqld_saf… Read More
  • Các phương thức import cơ sở dữ liệu MySQL1. Giới thiệu:Trong trường hợp bạn muốn sử dụng cơ sở dữ liệu mới, bạn cần sử dụng chức năng "Tạo cơ sở dữ liệu mới" trong cPanel. Bài viết này hướng dẫn các bạn cách Import cơ sở dữ liệu MySQL. 2. Cách thực hiện Import:… Read More
  • Cấu hình remote database trên vps/máy chủ riêngBước 1: Ssh vào server. Bươc 2: Chỉnh sửa file my.cnf. Đối với Centos khách hàng chỉnh sửa file my.cnf tại /etc/my.cnf . Tại [mysqld] thêm vào dòng bind-address=YOUR-SERVER-IP sau đó save file và dùng lệnh /etc/init.d/mysql … Read More

0 comments:

Post a Comment