开发者社区> 问答> 正文

报mysqlERRORunknown variableinnodbforcerecovery0这个错误 怎么解决


G:\java_tools\mysql-5.7.21-winx64>mysqld install
Service successfully installed.


G:\java_tools\mysql-5.7.21-winx64>cd G:\java_tools\mysql-5.7.21-winx64


G:\java_tools\mysql-5.7.21-winx64>cd bin


G:\java_tools\mysql-5.7.21-winx64\bin>mysqld --initialize --user=root --console
2018-02-21T15:15:08.491093Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is
deprecated. Please use --explicit_defaults_for_timestamp server option (see doc
umentation for more details).
2018-02-21T15:15:08.491093Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'E
RROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will
be merged with strict mode in a future release.
2018-02-21T15:15:08.491093Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not s
et.
2018-02-21T15:15:10.723220Z 0 [Warning] InnoDB: New log files created, LSN=45790


2018-02-21T15:15:11.626272Z 0 [Warning] InnoDB: Creating foreign key constraint
system tables.
2018-02-21T15:15:11.952291Z 0 [Warning] No existing UUID has been found, so we a
ssume that this is the first time that this server has been started. Generating
a new UUID: 02de899d-171a-11e8-9082-28d244ccf557.
2018-02-21T15:15:12.177304Z 0 [Warning] Gtid table is not ready to be used. Tabl
e 'mysql.gtid_executed' cannot be opened.
2018-02-21T15:15:12.187304Z 1 [Note] A temporary password is generated for root@
localhost: iS6wF7Si!+lO


G:\java_tools\mysql-5.7.21-winx64\bin>net start mysql
MySQL 服务正在启动 .
MySQL 服务已经启动成功。




G:\java_tools\mysql-5.7.21-winx64\bin>mysql -u root -p
mysql: [ERROR] unknown variable 'innodb_force_recovery=0'


G:\java_tools\mysql-5.7.21-winx64\bin>



展开
收起
wanghongzhi 2018-02-21 23:38:58 5153 0
1 条回答
写回答
取消 提交回答
  • 旺旺:nectar2。
    楼主您好,

    您可以尝试查找mysql的配置文件,如my.ini(或my.cnf)文件,看看里边有没有参数:innodb_force_recovery

    如有,可以尝试先注释掉,再尝试启动mysql。

    -------------------------

    回 2楼(wanghongzhi) 的帖子
    楼主您好,

    从mysql的文档来看,mysql5.7里有这个 innodb_force_recovery 参数选项的: https://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html

    您的mysql确认是mysql 5.7版本吗?

    如果是,或许您可再确认一下mysql进程使用的是哪个配置文件(my.ini)。
    2018-02-22 11:34:09
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载