cetim Posted August 28, 2015 at 01:58 PM Posted August 28, 2015 at 01:58 PM Здравствуйте. Помогите советом. Сегодня при проверке таблиц на некоторых появилась ошибка "client is using or hasn't closed the table properly". При входе на некоторые разделы билинга вываливается с ошибкой в браузере. Как проверить и отремонтировать таблицы ?
Sargas Posted August 28, 2015 at 02:06 PM Posted August 28, 2015 at 02:06 PM mysqlcheck -F -A --auto-repair
cetim Posted August 28, 2015 at 02:18 PM Author Posted August 28, 2015 at 02:18 PM Не помогло.Часто ругается на таблицу payments Например при вызове состояния системы wrong data input: SELECT COUNT(`id`) from `payments`
Sargas Posted August 28, 2015 at 02:38 PM Posted August 28, 2015 at 02:38 PM по окончанию проверки баз что писало в конце? ошибки были? Что в логе mysql? >wrong data input: SELECT COUNT(`id`) from `payments` Обычно mysql при ошибке пишет её номер. Выполните запрос в базе и скиньте точный текст что выдает mysql.
cetim Posted August 28, 2015 at 02:46 PM Author Posted August 28, 2015 at 02:46 PM По окончанию проверки ничего не выдает А это в логах : 150828 17:37:07 [ERROR] /usr/local/libexec/mysqld: Table './stg/payments' is marked as crashed and should be repaired
Sargas Posted August 28, 2015 at 02:55 PM Posted August 28, 2015 at 02:55 PM mysqlcheck -r stg payments что говорит?
cetim Posted August 28, 2015 at 03:06 PM Author Posted August 28, 2015 at 03:06 PM ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysqlcheck -r stg payments' at line 1
cetim Posted August 28, 2015 at 03:11 PM Author Posted August 28, 2015 at 03:11 PM 150828 15:02:34 InnoDB: Started; log sequence number 0 56090 150828 15:02:35 [Note] Event Scheduler: Loaded 0 events 150828 15:02:35 [Note] /usr/local/libexec/mysqld: ready for connections. Version: '5.1.73' socket: '/tmp/mysql.sock' port: 3306 FreeBSD port: mysql51-server-5.1.73_2 150828 15:46:03 [ERROR] /usr/local/libexec/mysqld: Table 'cardbank' is marked as crashed and should be repaired 150828 15:46:03 [ERROR] /usr/local/libexec/mysqld: Sort aborted 150828 15:46:38 [ERROR] /usr/local/libexec/mysqld: Table 'payments' is marked as crashed and should be repaired 150828 15:46:38 [ERROR] /usr/local/libexec/mysqld: Sort aborted 150828 16:08:29 [ERROR] /usr/local/libexec/mysqld: Table 'cardbank' is marked as crashed and should be repaired 150828 16:08:29 [ERROR] /usr/local/libexec/mysqld: Sort aborted 150828 16:09:24 [ERROR] /usr/local/libexec/mysqld: Table 'cardbank' is marked as crashed and should be repaired 150828 16:09:24 [ERROR] /usr/local/libexec/mysqld: Sort aborted 150828 16:12:41 [ERROR] /usr/local/libexec/mysqld: Table './stg/payments' is marked as crashed and should be repaired
cetim Posted August 28, 2015 at 03:13 PM Author Posted August 28, 2015 at 03:13 PM mysql> CHECK TABLE payments; +--------------+-------+----------+-------------------------------------------------------+ | Table | Op | Msg_type | Msg_text | +--------------+-------+----------+-------------------------------------------------------+ | stg.payments | check | warning | Table is marked as crashed | | stg.payments | check | warning | 1 client is using or hasn't closed the table properly | | stg.payments | check | error | Size of datafile is: 87660 Should be: 87740 | | stg.payments | check | error | Corrupt | +--------------+-------+----------+-------------------------------------------------------+ 4 rows in set (0.00 sec)
nightfly Posted August 28, 2015 at 03:43 PM Posted August 28, 2015 at 03:43 PM (edited) repair table payments repair table cardbank Детский сад прост. Edited August 28, 2015 at 03:44 PM by nightfly
cetim Posted August 28, 2015 at 03:45 PM Author Posted August 28, 2015 at 03:45 PM mysql> CHECK TABLE cardbank; +--------------+-------+----------+-------------------------------------------------------------+ | Table | Op | Msg_type | Msg_text | +--------------+-------+----------+-------------------------------------------------------------+ | stg.cardbank | check | warning | Table is marked as crashed and last repair failed | | stg.cardbank | check | warning | Size of indexfile is: 13312 Should be: 1024 | | stg.cardbank | check | error | Found key at page -1 that points to record outside datafile | | stg.cardbank | check | error | Corrupt | +--------------+-------+----------+-------------------------------------------------------------+ 4 rows in set (0.00 sec)
cetim Posted August 28, 2015 at 03:48 PM Author Posted August 28, 2015 at 03:48 PM Огромное спасибо. Только не понятно как это произошло.
l1ght Posted August 28, 2015 at 04:25 PM Posted August 28, 2015 at 04:25 PM Огромное спасибо. Только не понятно как это произошло. как-как, аварийное выключение свет пропал, из резетки шнурок выдернули или винт дохнет
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now