我正在使用auto
mysqlbackup脚本来转储我的mysql数据库,但我希望有一个只读用户来执行此操作,这样我就不会将我的根数据库密码存储在纯文本文件中.
我创建了一个像这样的用户:
grant select, lock tables on *.* to 'username'@'localhost' identified by 'password';
当我运行mysqldump(通过automysqlbackup或直接)时,我收到以下警告:
mysqldump: Got error: 1044: Access denied for user 'username'@'localhost' to database 'information_schema' when using LOCK TABLES
我做错了吗?我的readonly用户是否需要额外的资助?或者只能root锁定information_schema表?这是怎么回事?
编辑:
GAH,现在它的工作原理.我之前可能没有运行FLUSH PRIVILEGES.
另外,这种情况多久会自动发生?
编辑:
不,它不起作用.运行mysqldump -u username -p –all-databases> dump.sql手动不会生成错误,但不会转储information_schema. automysqlbackup确实引发了错误.