In mysql, you can use the "show variables" command to see where the database files are saved. This command is used to display the names and values of system variables. The syntax is "SHOW VARIABLES LIKE 'datadir';".
The operating environment of this tutorial: windows10 system, mysql8.0.22 version, Dell G3 computer.
Open the cmd window.
Enter the mysql -u root -p command and press Enter
Enter the mysql -u root -p command , and then press Enter
Enter the SHOW VARIABLES LIKE 'datadir'; command to return the database file saving path
Yes View system variables and their values through the SHOW VARIABLES statement.
Recommended learning:mysql video tutorial
The above is the detailed content of How to check where the database is saved in mysql. For more information, please follow other related articles on the PHP Chinese website!