Repairing a corrupted table, aftermath of Apache using up server resources and taking down MySQL
The Aftermath of MySQL Dying (briefly)
Duplicate entry for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES
after the fact, on going to http://www.wsf2008.net/eng/admin/user/access
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11699, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11677, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11700, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11701, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11678, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11679, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11699, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11699, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11699, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11699, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11699, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11699, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11699, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11699, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11677, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11677, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11677, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11677, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11677, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11677, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11677, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11677, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11700, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11700, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11700, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11700, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11700, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11700, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11700, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11700, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11701, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11701, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11701, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11701, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11701, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11701, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11701, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11701, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11678, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11678, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11678, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11678, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11678, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11678, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11678, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11678, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11679, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11679, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11679, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11679, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11679, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11679, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11679, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
# user warning: Duplicate entry 'eng' for key 2 query: INSERT INTO locales_target (lid, locale, translation) VALUES (11679, 'eng', '') in /var/www/d53/includes/database.mysql.inc on line 172.
MySQL said: Documentation
145 - Table './wsf2008/locales_target' is marked as crashed and should be repaired
http://www.karakas-online.de/EN-Book/repair-corrupt-table.html
Resolution
1 stedile:~# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
mysql> use wsf2008
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> repair table locales_target;
+------------------------+--------+----------+----------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+------------------------+--------+----------+----------------------------------------------+
| wsf2008.locales_target | repair | warning | Number of rows changed from 203230 to 203231 |
| wsf2008.locales_target | repair | status | OK |
+------------------------+--------+----------+----------------------------------------------+
2 rows in set (5.41 sec)
Comments
This command worked when others did not
Even when sudo myisamcheck -o and myisamcheck -r claimed it had already been fixed, mysqldump reported:
By contrast,
mysql -u root -p
mysql > USE exampledatabase;
mysql > REPAIR TABLE badtable;
mysql > exit;
Allowed mysqldump to do its work.
Post new comment