[root@cactitest ~]# mysqldump -uroot -p --default-character-set=utf8 --all-databases >alldb.sql
Enter password:
-- Warning: Skipping the data of table mysql.event. Specify the --events option explicitly.
mysqldump: Got error: 1142: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'accounts' when using LOCK TABLES
Enter password:
-- Warning: Skipping the data of table mysql.event. Specify the --events option explicitly.
mysqldump: Got error: 1142: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'accounts' when using LOCK TABLES
[root@cactitest ~]#
解决办法,添加参数 --skip-lock-tables