MySQL安装问题-mysqld: Can‘t create/write to file ‘D:\mysql-8.0.41-winx64\mysql-8.0.41-winx6in\is_writabl

D:\mysql-8.0.41-winx64\mysql-8.0.41-winx64\bin>mysqld --initialize
mysqld: Can't create/write to file 'D:\mysql-8.0.41-winx64\mysql-8.0.41-winx6in\is_writable' (OS errno 2 - No such file or directory)
2025-03-12T07:00:06.611895Z 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.
2025-03-12T07:00:06.612139Z 0 [System] [MY-013169] [Server] D:\mysql-8.0.41-winx64\mysql-8.0.41-winx64\bin\mysqld.exe (mysqld 8.0.41) initializing of server in progress as process 10616
2025-03-12T07:00:06.613346Z 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.
2025-03-12T07:00:06.614438Z 0 [ERROR] [MY-010460] [Server] --initialize specified but the data directory exists and is not writable. Aborting.
2025-03-12T07:00:06.614502Z 0 [ERROR] [MY-010187] [Server] Could not open file 'D:\mysql-8.0.41-winx64\mysql-8.0.41-winx6in\long7351.err' for error logging: Permission denied
2025-03-12T07:00:06.615043Z 0 [ERROR] [MY-013236] [Server] The designated data directory D:\mysql-8.0.41-winx64\mysql-8.0.41-winx6in\ is unusable. You can remove all files that the server added to it.
2025-03-12T07:00:06.615194Z 0 [ERROR] [MY-010119] [Server] Aborting
2025-03-12T07:00:06.615504Z 0 [System] [MY-010910] [Server] D:\mysql-8.0.41-winx64\mysql-8.0.41-winx64\bin\mysqld.exe: Shutdown complete (mysqld 8.0.41)  MySQL Community Server - GPL.

安装mysql后找不到目录,原因是路径里有windows风格的 " \ "。路径要改成unix风格的 " / ",而不是windows的风格。正确的如下:

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

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

https://blog.csdn.net/qq_32482645/article/details/117464592?fromshare=blogdetail&sharetype=blogdetail&sharerId=117464592&sharerefer=PC&sharesource=m0_51698237&sharefrom=from_link

如果仍有问题

可以尝试mysqld --initialize --console --datadir="D:\soft\mysql-8.0.41-winx64\mysql-8.0.41-winx64\data"

>mysqld --initialize --console --datadir="D:\soft\mysql-8.0.41-winx64\mysql-8.0.41-winx64\data"
2025-03-12T08:33:24.030503Z 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.
2025-03-12T08:33:24.030709Z 0 [System] [MY-013169] [Server] D:\soft\mysql-8.0.41-winx64\mysql-8.0.41-winx64\bin\mysqld.exe (mysqld 8.0.41) initializing of server in progress as process 15476
2025-03-12T08:33:24.047238Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2025-03-12T08:33:24.414644Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值