List:General Discussion« Previous MessageNext Message »
From:Paul Nowosielski Date:May 25 2006 7:07pm
Subject:Re: Backup and recovery problems
View as plain text  
On Thursday 25 May 2006 12:09, you wrote:
> Paul Nowosielski wrote:
> >Dear all,
> >
> >I've been testing our backup and recovery strategies here at work.
> >When dumping all the databases I'm using this command:
> >
> >mysqldump  --all-databases --force -u root -p -h 192.168.45.7 > all.sql
> >
> >When this command is run I receive these error messages:
> >mysqldump: mysqldump: Couldn't execute 'show create table
> > `help_category`': Can't find file: './mysql/help_category.frm' (errno:
> > 13) (1017)
> >mysqldump: mysqldump: Couldn't execute 'show create table `help_keyword`':
> >Can't find file: './mysql/help_keyword.frm' (errno: 13) (1017)
> >mysqldump: mysqldump: Couldn't execute 'show create table
> > `help_relation`': Can't find file: './mysql/help_relation.frm' (errno:
> > 13) (1017)
> >mysqldump: mysqldump: Couldn't execute 'show create table `help_topic`':
> > Can't find file: './mysql/help_topic.frm' (errno: 13) (1017)
> >mysqldump: mysqldump: Couldn't execute 'show create table `proc`': Can't
> > find file: './mysql/proc.frm' (errno: 13) (1017)
> >mysqldump: mysqldump: Couldn't execute 'show create table `procs_priv`':
> > Can't find file: './mysql/procs_priv.frm' (errno: 13) (1017)
> >mysqldump: mysqldump: Couldn't execute 'show create table `time_zone`':
> > Can't find file: './mysql/time_zone.frm' (errno: 13) (1017)
> >mysqldump: mysqldump: Couldn't execute 'show create table
> >`time_zone_leap_second`': Can't find file:
> >'./mysql/time_zone_leap_second.frm' (errno: 13) (1017)
> >mysqldump: mysqldump: Couldn't execute 'show create table
> > `time_zone_name`': Can't find file: './mysql/time_zone_name.frm' (errno:
> > 13) (1017)
> >mysqldump: mysqldump: Couldn't execute 'show create table
> >`time_zone_transition`': Can't find file:
> >'./mysql/time_zone_transition.frm' (errno: 13) (1017)
> >mysqldump: mysqldump: Couldn't execute 'show create table
> >`time_zone_transition_type`': Can't find file:
> >'./mysql/time_zone_transition_type.frm' (errno: 13) (1017)
> >
> >When I recover the databases using this command:
> >
> >mysql --force -u root -p -h localhost < all.sql
> >
> >Tables are missing (and not the ones the dump is complaining about) and
> >relations are broken.
> >
> >I'm assuming that the dump is dying before all the data is received.
> >
> >Can anyone give me advice on how to obtain a clean dump with all the
> > tables so I may sleep well at night?
> >
> >I'm using MySQL 4.0.26 client and sever for these databases.
> >
> >I had thought that using the --force switch would alleviate my concerns.
> >Unfortunately not...
> >
> >Best regards,
>
> perror 13
> Error code  13:  Permission denied
> Mysql does not have permiission to read its own tables.
>
> Perhaps you have been testing recovery strategies as root, and have
> changed the permissions?

Ok this is very strange. I checked the permissions on the data directory and 
they where set to 660(rw rw X) and owned by mysql.

I became the mysql user and listed the data/mysql directory:

mysql@opteron:/usr/local/src/mysql_current/data> ll mysql/

and I got:
/bin/ls: mysql/procs_priv.MYD: Permission denied
/bin/ls: mysql/procs_priv.MYI: Permission denied
/bin/ls: mysql/procs_priv.frm: Permission denied
/bin/ls: mysql/help_keyword.MYD: Permission denied
/bin/ls: mysql/help_keyword.MYI: Permission denied
/bin/ls: mysql/help_keyword.frm: Permission denied
/bin/ls: mysql/func.MYD: Permission denied
/bin/ls: mysql/func.MYI: Permission denied
/bin/ls: mysql/func.frm: Permission denied
/bin/ls: mysql/columns_priv.MYD: Permission denied
/bin/ls: mysql/columns_priv.MYI: Permission denied
/bin/ls: mysql/columns_priv.frm: Permission denied
/bin/ls: mysql/tables_priv.MYD: Permission denied
/bin/ls: mysql/tables_priv.MYI: Permission denied
/bin/ls: mysql/tables_priv.frm: Permission denied
/bin/ls: mysql/help_topic.MYD: Permission denied
/bin/ls: mysql/help_topic.MYI: Permission denied
/bin/ls: mysql/help_topic.frm: Permission denied
/bin/ls: mysql/time_zone_transition_type.MYD: Permission denied
/bin/ls: mysql/time_zone_transition_type.MYI: Permission denied
/bin/ls: mysql/time_zone_transition_type.frm: Permission denied
/bin/ls: mysql/time_zone_leap_second.MYD: Permission denied
/bin/ls: mysql/time_zone_leap_second.MYI: Permission denied
/bin/ls: mysql/time_zone_leap_second.frm: Permission denied
/bin/ls: mysql/db.MYD: Permission denied
/bin/ls: mysql/db.MYI: Permission denied
/bin/ls: mysql/db.frm: Permission denied
/bin/ls: mysql/host.MYD: Permission denied
/bin/ls: mysql/host.MYI: Permission denied
/bin/ls: mysql/host.frm: Permission denied
/bin/ls: mysql/help_relation.MYD: Permission denied
/bin/ls: mysql/help_relation.MYI: Permission denied
/bin/ls: mysql/help_relation.frm: Permission denied
/bin/ls: mysql/time_zone.MYD: Permission denied
/bin/ls: mysql/time_zone.MYI: Permission denied
/bin/ls: mysql/time_zone.frm: Permission denied
/bin/ls: mysql/proc.MYD: Permission denied
/bin/ls: mysql/proc.MYI: Permission denied
/bin/ls: mysql/proc.frm: Permission denied
/bin/ls: mysql/user.MYD: Permission denied
/bin/ls: mysql/user.MYI: Permission denied
/bin/ls: mysql/user.frm: Permission denied
/bin/ls: mysql/help_category.MYD: Permission denied
/bin/ls: mysql/help_category.MYI: Permission denied
/bin/ls: mysql/help_category.frm: Permission denied
/bin/ls: mysql/time_zone_name.MYD: Permission denied
/bin/ls: mysql/time_zone_name.MYI: Permission denied
/bin/ls: mysql/time_zone_name.frm: Permission denied
/bin/ls: mysql/time_zone_transition.MYD: Permission denied
/bin/ls: mysql/time_zone_transition.MYI: Permission denied
/bin/ls: mysql/time_zone_transition.frm: Permission denied
total 0

ok then I ran chmod -R 666 mysql and got the same thing!?

I can't under stand how files and the directory are set to 666 and I still
can't read it?

This only happens with the data/mysql directory. 

Any ideas??

Thank you,

-- 
Paul Nowosielski
Webmaster
office: 303.440.0666 ext 219
cel: 303.827.4257
Thread
Backup and recovery problemsPaul Nowosielski25 May
  • Re: Backup and recovery problemsgerald_clark25 May
Re: Backup and recovery problemsPaul Nowosielski25 May
  • Re: Backup and recovery problemsgerald_clark25 May
    • Re: Backup and recovery problemsPaul Nowosielski25 May