Deleted Logs.frm ... D'OH!!!
Posted: Wed Dec 30, 2015 10:21 am
So, I did a dumb thing, deleted Logs.frm
And mondorestore isn't happy with my mondoarchive backup of the night before, or the night before that. Which is to say ... I might not have a backup.
I all but never have to do anything in mysql, so I'm bumbling about here, guidance appreciated.
On the thought that maybe I could just recreate the table (hoping that zm logs are only backwards looking, and if all is sufficiently ok now, it's only logging going forwards that may matter to me), I thought to cut out the logs table creation mysql from /usr/share/zoneminder/db/zm_create.sql, but I'm not getting anywhere.
Logging in to mysql with the userid and password from /etc/zm/zm.conf,
# mysql -u {user} -p,
mysql> use zm
mysql> CREATE TABLE `Logs` ( ...
ERROR 1142 (42000): CREATE command denied to user 'zmuser'@'localhost' for table 'Logs'
{sigh}
So I try:
# mysql -u root -p
mysql> use zm
mysql> CREATE TABLE `Logs` ( ...
ERROR 1017 (HY000): Can't find file: './zm/Logs.frm' (errno: 13)
mysql> show tables;
- shows Logs, and I already know the file isn't there, so I suppose I need to drop the table first. Taking my cue from zm_create.sql ...
mysql> DROP TABLE IF EXISTS `Logs`;
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> CREATE TABLE `Logs` ( ...
ERROR 1017 (HY000): Can't find file: './zm/Logs.frm' (errno: 13)
mysql> show tables;
- does show Logs as being present.
Anyone know how I make mysql forget about the Logs.frm file so I can recreate it?n
For that matter, is doing so and recreating the table likely to let me get on with my day, with a reasonably happy zm?
TIA.
And mondorestore isn't happy with my mondoarchive backup of the night before, or the night before that. Which is to say ... I might not have a backup.
I all but never have to do anything in mysql, so I'm bumbling about here, guidance appreciated.
On the thought that maybe I could just recreate the table (hoping that zm logs are only backwards looking, and if all is sufficiently ok now, it's only logging going forwards that may matter to me), I thought to cut out the logs table creation mysql from /usr/share/zoneminder/db/zm_create.sql, but I'm not getting anywhere.
Logging in to mysql with the userid and password from /etc/zm/zm.conf,
# mysql -u {user} -p,
mysql> use zm
mysql> CREATE TABLE `Logs` ( ...
ERROR 1142 (42000): CREATE command denied to user 'zmuser'@'localhost' for table 'Logs'
{sigh}
So I try:
# mysql -u root -p
mysql> use zm
mysql> CREATE TABLE `Logs` ( ...
ERROR 1017 (HY000): Can't find file: './zm/Logs.frm' (errno: 13)
mysql> show tables;
- shows Logs, and I already know the file isn't there, so I suppose I need to drop the table first. Taking my cue from zm_create.sql ...
mysql> DROP TABLE IF EXISTS `Logs`;
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> CREATE TABLE `Logs` ( ...
ERROR 1017 (HY000): Can't find file: './zm/Logs.frm' (errno: 13)
mysql> show tables;
- does show Logs as being present.
Anyone know how I make mysql forget about the Logs.frm file so I can recreate it?n
For that matter, is doing so and recreating the table likely to let me get on with my day, with a reasonably happy zm?
TIA.