Windows下MySQL 5.7无法启动的解决方法
2016-12-21 00:00
1066 查看
问题描述:
从网上下了5.7 的MySQL,在bin目录下执行 start mysqld ,弹出个cmd窗口一闪就没了,也看不清是什么报错。mysqld --install安装了服务,也启动不了。
处理步骤:
1、打开事件查看器检查报错信息
2、网上查了,都说如果是 linux 需要执行 mysql_install_db;如果是Windows需要拷贝 user.frm user.MYD和user.MYI
3、不过,http://serverfault.com/questions/291126/mysql-fatal-error-cant-open-and-lock-privilege-tables-table-mysql-host-doe
这里面有人建议使用 mysqld --initialize
执行了下,报错:
C:\Program Files\MySQL\MySQL Server 5.7\bin>mysqld --initialize
2016-12-20T04:33:22.298853Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is
deprecated. Please use --explicit_defaults_for_timestamp server option (see doc
umentation for more details).
2016-12-20T04:33:22.298853Z 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.
2016-12-20T04:33:22.298853Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not s
et.
2016-12-20T04:33:22.303853Z 0 [ERROR] --initialize specified but the data direct
ory has files in it. Aborting.
2016-12-20T04:33:22.304853Z 0 [ERROR] Aborting
4、因为都是测试数据,我就直接把 datadir (我的是D:\MysqlData) 文件夹给删了。再次执行mysqld --initialize
C:\Program Files\MySQL\MySQL Server 5.7\bin>mysqld --initialize
5、启动服务(如果没有安装服务的话需要先 执行 mysqld --install)
C:\Program Files\MySQL\MySQL Server 5.7\bin>net start mysql
MySQL 服务正在启动 .
MySQL 服务已经启动成功。
这种方法比起拷贝 user. 文件的要简单,不过需要清除所有数据,适合在自己的测试环境上使用。
Windows下PHP安装路径配置错误导致Apache无法启动的解决方法
Windows ICS 服务无法启动问题解决方法
xampp中apache在windows7下无法启动的解决方法
在windows10上安装mysql详细图文教程
从网上下了5.7 的MySQL,在bin目录下执行 start mysqld ,弹出个cmd窗口一闪就没了,也看不清是什么报错。mysqld --install安装了服务,也启动不了。
处理步骤:
1、打开事件查看器检查报错信息
2、网上查了,都说如果是 linux 需要执行 mysql_install_db;如果是Windows需要拷贝 user.frm user.MYD和user.MYI
3、不过,http://serverfault.com/questions/291126/mysql-fatal-error-cant-open-and-lock-privilege-tables-table-mysql-host-doe
这里面有人建议使用 mysqld --initialize
执行了下,报错:
C:\Program Files\MySQL\MySQL Server 5.7\bin>mysqld --initialize
2016-12-20T04:33:22.298853Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is
deprecated. Please use --explicit_defaults_for_timestamp server option (see doc
umentation for more details).
2016-12-20T04:33:22.298853Z 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.
2016-12-20T04:33:22.298853Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not s
et.
2016-12-20T04:33:22.303853Z 0 [ERROR] --initialize specified but the data direct
ory has files in it. Aborting.
2016-12-20T04:33:22.304853Z 0 [ERROR] Aborting
4、因为都是测试数据,我就直接把 datadir (我的是D:\MysqlData) 文件夹给删了。再次执行mysqld --initialize
C:\Program Files\MySQL\MySQL Server 5.7\bin>mysqld --initialize
5、启动服务(如果没有安装服务的话需要先 执行 mysqld --install)
C:\Program Files\MySQL\MySQL Server 5.7\bin>net start mysql
MySQL 服务正在启动 .
MySQL 服务已经启动成功。
这种方法比起拷贝 user. 文件的要简单,不过需要清除所有数据,适合在自己的测试环境上使用。
您可能感兴趣的文章:
Windows系统下Apache、PHP无法启动问题总结Windows下PHP安装路径配置错误导致Apache无法启动的解决方法
Windows ICS 服务无法启动问题解决方法
xampp中apache在windows7下无法启动的解决方法
在windows10上安装mysql详细图文教程
相关文章推荐
- Windows下MySQL 5.7无法启动的解决方法
- windows无法启动MySQL服务报错1067的解决方法
- MySQL5.7改配置文件服务无法启动解决方法
- Windows7下mysql安装后服务无法启动和启动后无法登录的问题解决的方法
- Windows 64 位 mysql 5.7以上版本包解压中没有data目录和my-default.ini及服务无法启动的快速解决办法(问题小结)
- windows无法启动MySQL服务报错1067的解决方法
- windows 无法启动MYSQL服务”1067 进程意外终止”解决的方法——汇总及终极方法
- Windows 64 位 mysql 5.7以上版本包解压中没有data目录和my-default.ini以及服务无法启动的解决办法
- 《windows无法启动MySQL服务 错误1067:进程意外终止》的解决方法及反思
- MySQL 5.1 无法启动 1067 错误解决方法
- Windows下无法启动oracleDBConsole的解决方法
- 安装重装Mysql,配置Mysql时无法启动服务解决方法
- MYSQL无法启动提示: Default storage engine (InnoDB) is not available的解决方法
- XAMPP 1.7.0中MySql无法启动解决方法
- Windows 共享无线上网 无法启动ICS服务 解决方法
- MySQL 5.1 无法启动 1067 错误解决方法
- 双系统下删除Linux系统方法和Windows无法启动解决小结
- 因计算机磁盘硬件配置问题windows无法启动及HP系列机器不能使用GHOST的解决方法
- MySQL 服务无法启动 1067 错误 进程意外终止解决方法
- 使用xampp无法启动apache和mysql的解决方法