mysql8安装提示路径不存在

在尝试使用mysqld--initialize-insecure命令初始化MySQL时,遇到了路径无法创建的问题,原因是路径中的s被解析成了空格。错误信息显示数据目录不存在,以及权限被拒绝。解决方案是确保在my.ini配置文件中使用双斜杠(\)来指定安装目录和数据目录,以避免路径解析错误。
摘要由CSDN通过智能技术生成
D:\development\soft\db\mysql-8.0.32-winx64\bin>mysqld  --initialize-insecure
mysqld: Can't create directory 'D:\development oft\db\mysql-8.0.32-winx64\data\' (OS errno 2 - No such file or directory)
2023-04-16T15:22:22.320217Z 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.
2023-04-16T15:22:22.320516Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
2023-04-16T15:22:22.320531Z 0 [System] [MY-013169] [Server] D:\development\soft\db\mysql-8.0.32-winx64\bin\mysqld.exe (mysqld 8.0.32) initializing of server in progress as process 14228
2023-04-16T15:22:22.320651Z 0 [ERROR] [MY-010338] [Server] Can't find error-message file 'D:\development oft\db\mysql-8.0.32-winx64\share\errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.
2023-04-16T15:22:22.321160Z 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.
2023-04-16T15:22:22.324189Z 0 [ERROR] [MY-010187] [Server] Could not open file 'D:\development oft\db\mysql-8.0.32-winx64\data\DESKTOP-2373OEB.err' for error logging: Permission denied
2023-04-16T15:22:22.360909Z 0 [ERROR] [MY-013236] [Server] The designated data directory D:\development oft\db\mysql-8.0.32-winx64\data\ is unusable. You can remove all files that the server added to it.
2023-04-16T15:22:22.365125Z 0 [ERROR] [MY-010119] [Server] Aborting
2023-04-16T15:22:22.365283Z 0 [System] [MY-010910] [Server] D:\development\soft\db\mysql-8.0.32-winx64\bin\mysqld.exe: Shutdown complete (mysqld 8.0.32)  MySQL Community Server - GPL.

mysqld  --initialize-insecure 命令执行时,读取my.ini中的安装路径,会把\s转成空格,导致报错路径不存在

 解决办法:使用双斜杠

# 设置mysql的安装目录
basedir=D:\development\\soft\db\mysql-8.0.32-winx64
# 设置mysql数据库的数据的存放目录
datadir=D:\development\\soft\db\mysql-8.0.32-winx64\data

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值