刚刚搭建数据库时,在对数据库进行初始化时遇到这样的错误:
Error 2002 (HY000) : can’t connect to local mysql server through socket’/var/lib/mysql/mysql.sock’ (111)
而日志文件的报错是这样的:
2021-05-12 14:55:48 0 [Note] InnoDB: Checksum mismatch in datafile: ./ibdata1, Space ID:0, Flags: 0
2021-05-12 14:55:48 0 [ERROR] InnoDB: Corrupted page [page id: space=0, page number=0] of datafile './ibdata1' could not be found in the doublewrite buffer.
2021-05-12 14:55:48 0 [ERROR] InnoDB: Plugin initialization aborted with error Data structure corruption
2021-05-12 14:55:49 0 [Note] InnoDB: Starting shutdown...
2021-05-12 14:55:49 0 [ERROR] Plugin 'InnoDB'<