How to view the storage location of MySQL data files

How to view the storage location of MySQL data files

We may have a question: After we install MySQL locally (on our own computer), we create many databases and tables and store a lot of data, but where are these contents stored? In particular, when we need to directly operate these data files, we search the entire computer but cannot find where the MySQL data files are. This is a bit annoying!

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

show global variables like "%datadir%";

8

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

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

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

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Detailed explanation of MySQL file storage

<<:  Detailed explanation of Nginx's connection limit configuration for IP addresses in a network segment

>>:  Mini Program to Implement Slider Effect

Recommend

About Zabbix forget admin login password reset password

The problem of resetting the password for Zabbix ...

MySQL 5.7.21 installation and configuration method graphic tutorial (window)

Install mysql5.7.21 in the window environment. Th...

Detailed explanation of daily_routine example code in Linux

First look at the example code: #/bin/bash cal da...

How to change the password of mysql5.7.20 under linux CentOS 7.4

After MySQL was upgraded to version 5.7, its secu...

Summary of CSS front-end knowledge points (must read)

1. The concept of css: (Cascading Style Sheet) Ad...

React Native startup process detailed analysis

Introduction: This article takes the sample proje...

Some tips on speeding up the development of WeChat mini-programs

1. Create a page using app.json According to our ...

Hyperlink icon specifications: improve article readability

1. What is the hyperlink icon specification ?<...

Use of Linux chkconfig command

1. Command Introduction The chkconfig command is ...

base target="" specifies the target of the base link to open the frame

<base target=_blank> changes the target fram...

Mysql query database capacity method steps

Query the total size of all databases Here’s how:...

MySQL uses custom sequences to implement row_number functions (detailed steps)

After reading some articles, I finally figured ou...