User login

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:
mysqldump: Error 1194: Table 'cache_page' is marked as crashed and should be repaired when dumping table cache_page at row: 208

By contrast,

mysql -u root -p
mysql > USE exampledatabase;
mysql > REPAIR TABLE badtable;
mysql > exit;

Allowed mysqldump to do its work.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.