2019-08-28T02:03:41.175708Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2019-08-28T02:03:41.175728Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
出现这个问题的原因是因为有其他mysql进程在使用ibdata1这个文件,用ps -ef | grep mysql 找到相应进程kill掉。但是基本mysql都是有自动设置的,所以如果是自己启动失败的可以用Kill如果是自启动的mysql建议用 service mysqld stop
ps: 报错 Failed to open the relay log
2019-08-28T02:03:48.322431Z 0 [ERROR] Failed to open the relay log '/home/mysql/data3066/mysql/slave-relay.005628' (relay_log_pos 12018289).
2019-08-28T02:03:48.322443Z 0 [ERROR] Could not find target log file mentioned in relay log info in the index file './localhost-relay-bin.index' during relay log initialization.
2019-08-28T02:03:48.323166Z 0 [ERROR] Slave: Failed to initialize the master info structure for channel ''; its record may still be present in 'mysql.slave_master_info' table, consider deleting it.
2019-08-28T02:03:48.323182Z 0 [ERROR] Failed to create or recover replication info repositories.