mysqldump备份数据库报错
mysqldump -u root -p --all-databases > /data1/www/20180815.sql;
出现错误:
-- Warning: Skipping the data of table mysql.event. Specify the --events option explicitly. mysqldump: Got error: 1016: Can't open file: './shsbim/pre_ucenter_protectedmembers.frm' (errno: 24) when using LOCK TABLES
修改成:
mysqldump -u root -p --events --ignore-table=mysql.events --all-databases > /data1/www/20180815.sql;
报错:
mysqldump: Got error: 1016: Can't open file: './shsbim/pre_ucenter_protectedmembers.frm' (errno: 24) when using LOCK TABLES
最后发现修改 my.cnf 配置文件,在 mysqld 下修改
[mysqld]open_files_limit = 65535
重启mysql 最后备份成功。