[Solved] Error in executing mysqld — initialize command

D:\develop\mysql-5.7.27-winx64\bin>mysqld –initialize
mysqld: Can’t create directory ‘D:\mysql-5.7.27-winx64\data’ (Errcode: 2 – No such file or directory)
2021-06-27T11:23:41.634820Z 0 [ERROR] Can’t find error-message file ‘D:\mysql-5.7.27-winx64\share\errmsg.sys’. Check error-message file location and ‘lc-messages-dir’ configuration directive.
2021-06-27T11:23:41.638039Z 0 [ERROR] Aborting

Solution:
Just modify the path in the my.ini configuration file

Read More: