MySQL backup user
-
Peter_w
- Posts: 5
- Joined: Mon Aug 04, 2008 7:43 pm
MySQL backup user
What rights does a MySQL backup user need?
-
Peter_w
- Posts: 5
- Joined: Mon Aug 04, 2008 7:43 pm
Re: MySQL backup user
I thought it only needed select.
But when I try to do a dump I get the following message:
Does anyone know what more rights I need to give the backup user?
Code: Select all
grant select on database.* to 'backup'@'localhost' identified by 'password';Code: Select all
$ mysqldump -u backup --password="password" database > backupfile.sql
mysqldump: Got error: 1044: Access denied for user 'backup'@'localhost' to database 'database' when using LOCK TABLES-
Chris
- Site Admin
- Posts: 132
- Joined: Mon Jul 21, 2008 9:45 am
- Location: Leuven, Belgium
Re: MySQL backup user
Select is enough to do a backup.
But the error message you get is a bug/feature.
Add --skip-lock-tables and it should work.
locking of tables, which is recommended to do a
inclusive dump of all data in the databases. The problem with locks is
that writes are suspended during this time, so it could cause some
application related issues, which is usually not worth the trade-off.
But the error message you get is a bug/feature.
Add --skip-lock-tables and it should work.
Code: Select all
$ mysqldump -u backup --password="password" --skip-lock-tables database > backupfile.sqlinclusive dump of all data in the databases. The problem with locks is
that writes are suspended during this time, so it could cause some
application related issues, which is usually not worth the trade-off.