mysql 安装出错,提示“mysqld: Can't change dir to 'D:\MySQL\MySQL Server 5.7\data\'”

https://www.mysql.com/downloads/ 下载 mysql-installer-community-5.7.21.0.msi 时,报错:

mysqld: Can't change dir to 'D:\MySQL\MySQL Server 5.7\data\' (Errcode: 2 - No s
uch file or directory)
2018-02-11T09:25:20.258000Z 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-11T09:25:20.258000Z 0 [Note] --secure-file-priv is set to NULL. Operatio
ns related to importing and exporting data are disabled
2018-02-11T09:25:20.258000Z 0 [Note] D:\MySQL\MySQL Server 5.7\bin\mysqld.exe (m
ysqld 5.7.20) starting as process 128288 ...
2018-02-11T09:25:20.261000Z 0 [Warning] Can't create test file D:\MySQL\MySQL Se
rver 5.7\data\PC-201709071138.lower-test
2018-02-11T09:25:20.262000Z 0 [Warning] Can't create test file D:\MySQL\MySQL Se
rver 5.7\data\PC-201709071138.lower-test
2018-02-11T09:25:20.262000Z 0 [ERROR] failed to set datadir to D:\MySQL\MySQL Se
rver 5.7\data\
2018-02-11T09:25:20.262000Z 0 [ERROR] Aborting

2018-02-11T09:25:20.262000Z 0 [Note] Binlog end
2018-02-11T09:25:20.263000Z 0 [Note] D:\MySQL\MySQL Server 5.7\bin\mysqld.exe: S
hutdown complete


解决办法, 看 log 是mysql安装路径缺少了 \data\ 文件夹,手动进入安装目录发现果然没有!!!!

于是乎自己创建了一个 D:\MySQL\MySQL Server 5.7\data,然后在尝试 cmd :

mysqld.exe --console

激动人性的时刻到了:


到此,证明 mysql 安装成功了,不要谢我~

评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值