在進行Mysql備份的時候:
sudo /usr/bin/mysqldump -ubackupuser -pdbpassword --database upmngr >/tmp/`date '+%Y%m%d%H%M%S'`.log
出現下面的錯誤提示:
Warning: Using unique option prefix database instead of databases is deprecated and will be removed in a future release. Please use the full name instead. mysqldump: Got error: 1044: Access denied for user 'backupuser'@'%' to database 'upmngr' when using LOCK TABLES
大概意思就是在鎖表的的時候沒有權限操作
對於我的backupuser 備份用戶我只授予了select的權限。
步驟如下:
insert
。。。。
最終的解決方案:
--skip-lock-tables