mysql异机恢复时需要注意的地方
mysql 启动命令:
/monitor/mysql/bin/mysqld --datadir=/home/tmp/ --user=mysql --log-error=/home/tmp/service2.err --pid-file=/home/tmp/service2.pid --socket=/home/tmp/mysql.sock --port=3308
如果当前环境已经有mysql 库运行:
1.需注意 datadir,pid-file,socket,log-error,port 等参数,不要和现有库环境冲突;
2.在使用 innobackupx 备份恢复后的文件,需要注意文件,文件目录的权限,属组是否正确?
可能的类似error:
[ERROR] InnoDB: Could not find a valid tablespace file for 'tpcc/order_line'. See https://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
[ERROR] InnoDB: Tablespace open failed for '"tpcc"."order_line"', ignored.
InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights toInnoDB: the directory.
处理方法:
chmod -R 777 *
chown -R mysql:mysql *
下一篇: HDU 5045 费用流求最大权