Baron Schwartz wrote:
Hi Joseph,

Joseph Koenig wrote:
Hi,

I'm running MySQL 5.0.27-standard-log on RHEL 4. After install, I moved the data directory of MySQL. I updated everything that SELinux complained about,
etc., and have a functional install of MySQL. It's actually been up and
running with no issues for months. However, every time I run a mysqldump, I
get:

mysqldump: Got error: 1017: Can't find file: 'general_log' (errno: 2) when
using LOCK TABLES
mysqldump: Couldn't execute 'show create table `general_log`': Can't find
file: 'general_log' (errno: 2) (1017)
mysqldump: Couldn't execute 'show create table `slow_log`': Can't find file:
'slow_log' (errno: 2) (1017)

My dump proceeds and just spits these errors out to me. From what I can
tell, no harm is done, as the dump is full and is perfectly usable for
restoring databases from. However, it's driving me nuts. Is there any way to create the necessary tables now so that MySQL does actually start logging everything they way it should be able to and also will make these errors go
away? Thanks in advance,

It's a hard to tell from this description what is the matter. Can you connect via mysql and run "SHOW CREATE TABLE slow_log" without errors? If so, what storage engine do they use? It sounds to me like they might be using the CSV storage engine and the file isn't there. Error 2 is 'OS error code 2: No such file or directory' according to perror.

You probably don't want to mysqldump a big CSV file of your general log, at least not if you're using this for backups (but maybe you do, I don't know).

In short, you might want to DROP the tables instead of creating them.

It looks like there was a 5.1 installation here at some point - 5.0.37 should not include the general_log or slow_log tables - these are 5.1 new features.

I suspect that you likely have general_log and slow_log frm files within the mysql database directory, without any corresponding data files. If this is the case then just 'rm' the general_log.frm and slow_log.frm files from the mysql database directory, and all these errors should go away.

Cheers,

Mark

--
Mark Leith, Support Engineer
MySQL AB, Worcester, England, www.mysql.com
Are you MySQL certified?  www.mysql.com/certification


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to