HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

missing frm files for restore

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
frmfilesformissingrestore

Problem

We backup a database daily with mysqldump using the following options:

--quick --hex-blob --lock-tables --skip-extended-insert  --flush-logs --max_allowed_packet=500M


Each database gets its own directory and that directory has a .sql file for each table in the database.

I recently tried to do a test restore and I get the following error over and over for each table in the .sql file I try to import:


ERROR 1017 (HY000): Can't find file: './WhateverTableIQuery.frm'
(errno: 13)

The .frm files are indeed on the source machine but all I'm getting in the backup is tarballs of .sql files.

Am I doing the backup wrong or the restore wrong?

Solution

$ perror 13
OS error code  13:  Permission denied


Fix the permissions so that "mysql" can read the file. Keep in mind that the OS 'root' and the mysql 'root' are not the same.

Code Snippets

$ perror 13
OS error code  13:  Permission denied

Context

StackExchange Database Administrators Q#125258, answer score: 2

Revisions (0)

No revisions yet.