PHP Errors after power failure (SOLVED)

Support and queries relating to all previous versions of ZoneMinder
Locked
Beofres
Posts: 32
Joined: Tue Jun 19, 2007 6:53 pm
Location: North-Bay , California

PHP Errors after power failure (SOLVED)

Post by Beofres »

After losing power briefly due to a tripped circuit, I logged into ZM fine but after logging in, the console has the following messages above it:

Code: Select all

Warning: mysql_query() [function.mysql-query]: Unable to save result set in /var/www/zm/zm_html_view_console.php on line 78
Table 'E' is marked as crashed and should be repaired
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /var/www/zm/zm_html_view_console.php on line 81

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /var/www/zm/zm_html_view_console.php on line 82

Warning: array_merge() [function.array-merge]: Argument #3 is not an array in /var/www/zm/zm_html_view_console.php on line 91
As you can see in the first message, a table is 'crashed'. How do I go about repairing it? What other checks can I do to fix the rest of the errors? Any advice would be greatly appreciated...

Running Ubuntu 7.04 and ZM 1.22.3 compiled using the Feisty 7.04 walkthrough by ktheking:

(http://www.zoneminder.com/forums/viewtopic.php?p=36524)
Last edited by Beofres on Mon Jul 28, 2008 7:19 pm, edited 1 time in total.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Beofres
Posts: 32
Joined: Tue Jun 19, 2007 6:53 pm
Location: North-Bay , California

Fixed!

Post by Beofres »

Thanks. Running the following command:

Code: Select all

mysqlcheck --auto-repair --all-databases

...fixed my issue immediately. Thank you for the prompt response!
coke
Posts: 518
Joined: Wed Jan 30, 2008 5:53 pm
Location: St. Louis, MO, USA

Post by coke »

"MySQL Administrator" isn't a bad thing to have in your toolkit, also. Gives you a GUI to all of those options. It's part of the MySQL GUI Tools package, I believe. Free.

I've been tempted to add that command line version mentioned in the above post to the init scripts on my machine to avoid that problem in the future, but haven't gotten around to it.
Locked