您好,欢迎来到年旅网。
搜索
您的当前位置:首页在win10上同时安装MySQL8.0和MySQL5.7遇到的问题和解决方法

在win10上同时安装MySQL8.0和MySQL5.7遇到的问题和解决方法

来源:年旅网

一、具体安装过程可以参考()

二、问题记录

背景描述:当前我已安装好mysql5.7,需要再安装一个8版本,以下是遇到的问题。

1、在执行mysqld --initialize --console时出错
报错如下:

mysqld: [ERROR] Found option without preceding group in config file D:\mysql\mysql-8.0.33-winx64\my.ini at line 1.
mysqld: [ERROR] Fatal error in defaults handling. Program aborted!

解决方法:
1、确认my.ini配置文件内容无误
2、用Notepad打开文件,转码为ANSI编码(有些情况是UTF-8编码就可以用,我一台电脑要用ANSI,一台电脑用UTF-8也没有报错)

2、同样在执行mysqld --initialize --console时出错

报错如下:

  149627Z 0 [System] [MY-015017] [Server] MySQL Server Initialization - start.
  162446Z 0 [Warning] [MY-000081] [Server] option 'wait_timeout': unsigned value 31536000 adjusted to 2147483.
  162499Z 0 [Warning] [MY-010915] [Server] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
  163202Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
  163256Z 0 [System] [MY-013169] [Server] D:\xxx\MySQL80\mysql-8.1.0-winx64\bin\mysqld.exe (mysqld 8.1.0) initializing of server in progress as process 3228
  163538Z 0 [ERROR] [MY-010340] [Server] Error message file 'D:\xxx\MySQL\mysql-5.7.28-winx64\share\english\errmsg.sys' had only 1119 error messages, but it should contain at least 5891 error messages. Check that the above file is the right version for this program!
  167073Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
  167372Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting.
  167391Z 0 [ERROR] [MY-013236] [Server] The designated data directory D:\xxx\MySQL\mysql-5.7.28-winx64\data\ is unusable. You can remove all files that the server added to it.
  236096Z 0 [ERROR] [MY-010119] [Server] Aborting
  236394Z 0 [System] [MY-010910] [Server] D:\xxx\MySQL80\mysql-8.1.0-winx64\bin\mysqld.exe: Shutdown complete (mysqld 8.1.0)  MySQL Community Server - GPL.
  237055Z 0 [System] [MY-015018] [Server] MySQL Server Initialization - end.

大概提示是已存在data文件夹,并且指向了已经装好的5.7版本位置

解决方法:
找到5.7版本解压的地方,把5.7版本的my.ini配置文件后缀改为txt即使5.7的安装配置文件失效,再重新执行mysqld --initialize --console

3、安装安装mysqld --install mysql80 ,成功后,执行net start mysql80失败

报错如下:

服务启动中...
服务无法启动...
服务没有报告任何错误....

解决方法:
1、确认端口号没有被占用
2、打开注册表编辑器(win + R 输入 regedit 回车)
路径:计算机\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- oldu.cn 版权所有 浙ICP备2024123271号-1

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务