MYSQL安装求解!!!!

mysqld: Can't change dir to 'G:\MYSQL\Data\' (Errcode: 2 - No such file or directory)

2021-06-11T14:33:20.269463Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2021-06-11T14:33:20.269588Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled

2021-06-11T14:33:20.270438Z 0 [Note] mysqld (mysqld 5.7.33) starting as process 11312 ...

2021-06-11T14:33:20.274307Z 0 [Warning] Can't create test file G:\MYSQL\Data\Baron.lower-test

2021-06-11T14:33:20.274679Z 0 [Warning] Can't create test file G:\MYSQL\Data\Baron.lower-test

2021-06-11T14:33:20.275574Z 0 [ERROR] failed to set datadir to G:\MYSQL\Data\

2021-06-11T14:33:20.275901Z 0 [ERROR] Aborting

 

2021-06-11T14:33:20.276095Z 0 [Note] Binlog end

2021-06-11T14:33:20.276842Z 0 [Note] mysqld: Shutdown complete

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

于是乎自己创建了一个 'G:\MYSQL\Data\,然后在尝试 cmd :

 

mysqld.exe --console

激动人性的时刻到了:

到此,证明 mysql 安装成功了

输入初始化命令后就这样了

直接用安装包安装不是简单的多吗