
今天在本地windows环境安装一个mysql服务
mysqld: Can't create directory 'D:\mysql\mysql-8.0.17-winx64\data\' (OS errno 2 - No such file or directory)
2021-12-14T06:49:45.127258Z 0 [System] [MY-013169] [Server] D:\mysql\mysql-8.0.27-winx64\bin\mysqld.exe (mysqld 8.0.27) initializing of server in progress as process 14276
2021-12-14T06:49:45.127335Z 0 [ERROR] [MY-010338] [Server] Can't find error-message file 'D:\mysql\mysql-8.0.27-winx64 hare\errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.
2021-12-14T06:49:45.127785Z 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.
2021-12-14T06:49:45.129040Z 0 [ERROR] [MY-010187] [Server] Could not open file 'D:\mysql\mysql-8.0.17-winx64\data\DESKTOP-F48M3QT.err' for error logging: Permission denied
2021-12-14T06:49:45.129458Z 0 [ERROR] [MY-013236] [Server] The designated data directory D:\mysql\mysql-8.0.17-winx64\data\ is unusable. You can remove all files that the server added to it.
2021-12-14T06:49:45.129562Z 0 [ERROR] [MY-010119] [Server] Aborting
2021-12-14T06:49:45.129697Z 0 [System] [MY-010910] [Server] D:\mysql\mysql-8.0.27-winx64\bin\mysqld.exe: Shutdown complete (mysqld 8.0.27) MySQL Community Server - GPL.初始化命令:
mysqld --initialize-insecure --user=mysql原因:
my.ini文件路径输入错误,\写成了\\。
正确应该为:
basedir = D:\mysql\mysql-8.0.27-winx64
# 设置mysql数据库的数据的存放目录
datadir = D:\mysql\mysql-8.0.27-winx64\data安装命令:
mysqld --install报错:
Install/Remove of the Service Denied!解决方案:
cmd窗口没有以管理员身份打开
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。