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

Blog    

Recommend

Uniapp WeChat applet: Solution to key failure

uniapp code <template> <view> <ima...

Summary of common docker commands

Docker installation 1. Requirements: Linux kernel...

How to set a fixed IP address in CentOS7 virtual machine

Since my development environment is to install Ce...

Vue implements three-level navigation display and hiding

This article example shares the specific code of ...

5 ways to migrate from MySQL to ClickHouse

Data migration needs to be imported from MySQL to...

Ubuntu Basic Tutorial: apt-get Command

Preface The apt-get command is a package manageme...

Methods and steps for deploying go projects based on Docker images

Dependence on knowledge Go cross-compilation basi...

How to delete an image in Docker

The command to delete images in docker is docker ...

Docker image creation Dockerfile and commit operations

Build the image There are two main ways to build ...

Summary of 7 reasons why Docker is not suitable for deploying databases

Docker has been very popular in the past two year...

Vendor Prefix: Why do we need a browser engine prefix?

What is the Vendor Prefix? Vendor prefix—Browser ...

How to install MySQL 8.0 in Docker

Environment: MacOS_Cetalina_10.15.1, Mysql8.0.18,...