cetim Posted August 28, 2015 Posted August 28, 2015 Здравствуйте. Помогите советом. Сегодня при проверке таблиц на некоторых появилась ошибка "client is using or hasn't closed the table properly". При входе на некоторые разделы билинга вываливается с ошибкой в браузере. Как проверить и отремонтировать таблицы ?
cetim Posted August 28, 2015 Author Posted August 28, 2015 Не помогло.Часто ругается на таблицу payments Например при вызове состояния системы wrong data input: SELECT COUNT(`id`) from `payments`
Sargas Posted August 28, 2015 Posted August 28, 2015 по окончанию проверки баз что писало в конце? ошибки были? Что в логе mysql? >wrong data input: SELECT COUNT(`id`) from `payments` Обычно mysql при ошибке пишет её номер. Выполните запрос в базе и скиньте точный текст что выдает mysql.
cetim Posted August 28, 2015 Author Posted August 28, 2015 По окончанию проверки ничего не выдает А это в логах : 150828 17:37:07 [ERROR] /usr/local/libexec/mysqld: Table './stg/payments' is marked as crashed and should be repaired
cetim Posted August 28, 2015 Author Posted August 28, 2015 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 Author Posted August 28, 2015 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 Author Posted August 28, 2015 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 Posted August 28, 2015 (edited) repair table payments repair table cardbank Детский сад прост. Edited August 28, 2015 by nightfly
cetim Posted August 28, 2015 Author Posted August 28, 2015 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 Author Posted August 28, 2015 Огромное спасибо. Только не понятно как это произошло.
l1ght Posted August 28, 2015 Posted August 28, 2015 Огромное спасибо. Только не понятно как это произошло. как-как, аварийное выключение свет пропал, из резетки шнурок выдернули или винт дохнет
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