Home  >  Article  >  Database  >  How to check where the database is saved in mysql

How to check where the database is saved in mysql

WBOY
WBOYOriginal
2022-02-15 10:26:0814229browse

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';".

How to check where the database is saved in mysql

The operating environment of this tutorial: windows10 system, mysql8.0.22 version, Dell G3 computer.

How does mysql check where the database is saved?

Open the cmd window.

How to check where the database is saved in mysql

Enter the mysql -u root -p command and press Enter

How to check where the database is saved in mysql

Enter the mysql -u root -p command , and then press Enter

How to check where the database is saved in mysql

Enter the SHOW VARIABLES LIKE 'datadir'; command to return the database file saving path

How to check where the database is saved in mysql

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn