Home > Database > Mysql Tutorial > body text

How to view the storage location of MySQL data files

小云云
Release: 2017-12-08 13:08:53
Original
2071 people have browsed it

We may have a doubt, that is: after we installed MySQL locally (on our own computer), we also created a lot of databases, tables, and stored a lot of data, but these contents are all Where is it stored? In particular, when we need to directly operate these data files, we have searched the entire computer but cannot find where the MySQL data files are. This is a bit cheating! This article mainly introduces in detail how to view the storage location of MySQL data files. It has certain reference value and interested friends can refer to it.

Here, I will teach you a very simple method to immediately locate the storage location of the MySQL data file, that is, type the following command on the MySQL client:

show global variables like "%datadir%";
Copy after login

How to view the storage location of MySQL data files

#As shown in the figure above, MySQL data files are stored in the Data directory. As for whether you want to check the specific database or table next, it depends on your mood!

But you may still have a question, that is, we have all found that the MySQL data files are in the ProgramData directory of the C drive, but we have searched the entire C drive and still cannot find the ProgramData folder. This is Why? The answer is: By default, the ProgramData folder is hidden.

As for how to display hidden folders, I believe everyone has already played it very well!

Related recommendations:

PHP’s method of caching based on file storage, _PHP tutorial

MySQL specifies the data file storage path DATA DIRECTORY and INDEX DIRECTORY

mysql cluster uses disk file storage tables

The above is the detailed content of How to view the storage location of MySQL data files. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!