: Can't change dir to 'G:\\x8f6f\x4ef6\phpstudy\phpstudy_pro\Extensions\MySQL8.0.12\data\' (OS errno 2 - No such file or directory)
2020-11-04T04:52:13.680803Z 0 [System] [MY-010
116] [Server] G:\ (mysqld 8.0.12) starting as process 3232
2020-11-04T04:52:13.680912Z 0 [ERROR] [MY-010338] [Server] Can't find error-message file 'G:\x8f6f\x4ef6\phpstudy\phpstudy_pro\Extensions\MySQL8.0.12\share\errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.
2020-11-04T04:52:13.682323Z 0 [Warning] [MY-010091] [Server] Can't create test file G:\\x8f6f\x4ef6\phpstudy\phpstudy_pro\Extensions\MySQL8.0.12\data\DESKTOP-K3RGHL5.lower-test
2020-11-04T04:52:13.682425Z 0 [Warning] [MY-010091] [Server] Can't create test file G:\\x8f6f\x4ef6\phpstudy\phpstudy_pro\Extensions\MySQL8.0.12\data\DESKTOP-K3RGHL5.lower-test
2020-11-04T04:52:13.682577Z 0 [ERROR] [MY-010172] [Server] failed to set datadir to G:\\x8f6f\x4ef6\phpstudy\phpstudy_pro\Extensions\MySQL8.0.12\data\
2020-11-04T04:52:13.683675Z 0 [ERROR] [MY-010119] [Server] Aborting
2020-11-04T04:52:13.683882Z 0 [System] [MY-010910] [Server] G:\: Shutdown complete (mysqld 8.0.12) MySQL Community Server - GPL.
上面是完整的代码报错
原因:我出现这个错误的原因是我把phpstudy存放在了一个带中文的文件夹下之后就报了这个错
解决方案:将存放phpstudy的文件夹名改成英文,特别注意如果你存放phpstudy的文件夹下还安装有其他的exe程序
改掉文件的名字也会对这些程序产生影响如改变应用程序的图标甚至直接无法使用该应用程序所以如果当前文件夹下程序安的太多了就建议把phpstudy卸载(注意是卸载不是删除文件夹删文件夹是删不干净的)要先结束掉phpstudy的进程可以参考这篇博客结束掉进程之后再删掉安装的文件夹即可然后再把phpstudy重新装到另一个文件夹下