MySql decompressed version has no data directory solution

When installing mysql 5.7+ version, if you find that the data folder is missing in the root directory,
***Please do not copy the data folder of other versions! ***
Because of this operation, there will be many potential problems: for example, when I execute the show variables like "%charact%"; statement, the error table does not exist!
Open the cmd command window as an administrator, and go to the bin directory of the mysql installation directory. Then enter the command:
mysqld --initialize-insecure --user=mysql and press
Enter; go to the directory to view, the data folder has been automatically created.
problem solved!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326380514&siteId=291194637