mysqld --initialize 错误:mysqld: Can‘t create/write to file ‘G: ool\mysql\data\is_writable‘

 

最近准备在windows下新部署一个mysql绿色版本。发现出现这个问题,提示我的目录不存在。

G:\tool\mysql\bin>mysqld --initialize
mysqld: Can't create/write to file 'G:  ool\mysql\data\is_writable' (Errcode: 2 - No such file or directory)
2021-06-02T04:01:42.535302Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2021-06-02T04:01:42.538294Z 0 [ERROR] Can't find error-message file 'G:\tool\mysql\bin\ ool\mysql\share\errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.
2021-06-02T04:01:42.541286Z 0 [ERROR] --initialize specified but the data directory exists and is not writable. Aborting.
2021-06-02T04:01:42.541286Z 0 [ERROR] Aborting

我发现电脑明明有个这个目录,mysql却找不到。

然后我注意到这一段,mysql打出来的日志,tool文件夹的“t”不见了,我尝试了各种方式,只要以打t头就会有问题。

G:  ool\mysql\data\is_writable' (Errcode: 2 - No such file or directory)

最后我发现\t 有转义的成空格情况。原理是 \t 在数据传输的时候被转义成了空格。

然后实验换成n开头的目录,果然换行了。

G:\nool\mysql\bin>mysqld --initialize
mysqld: Can't create/write to file 'G:
ool\mysql\data\is_writable' (Errcode: 2 - No such file or directory)
2021-06-02T04:18:52.199322Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2021-06-02T04:18:52.200319Z 0 [ERROR] Can't find error-message file 'G:\nool\mysql\bin\
ool\mysql\share\errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.
2021-06-02T04:18:52.202314Z 0 [ERROR] --initialize specified but the data directory exists and is not writable. Aborting.
2021-06-02T04:18:52.202314Z 0 [ERROR] Aborting

解决办法:单斜杆换成双斜杆,G:\\tool\\mysql\\data

 

 

  • 21
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 5
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值