Analytics SQLSTATE[HY000]: General error: 1194 Table 'log_link_visit_action' is marked as crashed and should be repaired

Hi all.

I updated to 1.9.1 the other day and everything was fine but then today I am getting this error:

SQLSTATE[HY000]: General error: 1194 Table ‘log_link_visit_action’ is marked as crashed and should be repaired

Any suggestions please for what I need to do?

Thank you

In phpmyadmin execute the SQL Query


REPAIR TABLE log_link_visit_action

Hi Matt,

Thanks for your reply. Any ideas on this please…

Thanks…


$ mysql -u ****piwik -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7128
Server version: 5.0.51a-24+lenny4 (Debian)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use hoppiwik
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> check table log_link_visit_action;
+--------------------------------+-------+----------+------------------------------------------------------+
| Table                          | Op    | Msg_type | Msg_text                                             |
+--------------------------------+-------+----------+------------------------------------------------------+
| hoppiwik.log_link_visit_action | check | Error    | Table 'hoppiwik.log_link_visit_action' doesn't exist |         
| hoppiwik.log_link_visit_action | check | error    | Corrupt                                              |         
+--------------------------------+-------+----------+------------------------------------------------------+
2 rows in set (0.04 sec)

mysql> repair table log_link_visit_action;
+--------------------------------+--------+----------+------------------------------------------------------+
| Table                          | Op     | Msg_type | Msg_text                                             |
+--------------------------------+--------+----------+------------------------------------------------------+
| hoppiwik.log_link_visit_action | repair | Error    | Table 'hoppiwik.log_link_visit_action' doesn't exist |
| hoppiwik.log_link_visit_action | repair | error    | Corrupt                                              |
+--------------------------------+--------+----------+------------------------------------------------------+
2 rows in set (0.00 sec)

mysql> check table log_link_visit_action;
+--------------------------------+-------+----------+------------------------------------------------------+
| Table                          | Op    | Msg_type | Msg_text                                             |
+--------------------------------+-------+----------+------------------------------------------------------+
| hoppiwik.log_link_visit_action | check | Error    | Table 'hoppiwik.log_link_visit_action' doesn't exist |         
| hoppiwik.log_link_visit_action | check | error    | Corrupt                                              |         
+--------------------------------+-------+----------+------------------------------------------------------+
2 rows in set (0.04 sec)


mysql>

Oh it looks like another problem :frowning: Maybe you have a fresh backup?
Or search online there might be other solution for this problem, let us know!

Does this help me?

http://forum.piwik.org/read.php?2,80622,page=1#msg-80685

Thanks

Hi Matt

Sorry to bug you but I am just bumping this. If the piwik link in my previous post doesn’t help me then my next option will be to used a backed up database back from a few weeks ago. I can’t remember now what version this back up was from but anyway the corrupted database is 1.9.1. If I restore the pre 1.9.1 database will it update ok to 1.9.1?

Thanks

You can try to run the command put in the other forum post but I think it’s similar to CHECK TABLE command you run earlier. I would recommend restoring the table from your backup. There might be missing schema updates so let’ssee errors you get & you can find schema updates in piwik/core/Updates/1.9*** if any

@ matt, I found a recent sql file so I restored the database with only a few days of data missing.

:slight_smile:

Thanks for your help…