Where is mysql data stored?

Where is mysql data stored?

MySQL database storage location:

1. If MySQL uses the MyISAM storage engine, the database file types include .frm, .MYD, and .MYI. The default storage location is

C:\Documentsand Settings\AllUsers\Application Data\MySQL\MySQL Server 5.1\data

2. If MySQL uses the InnoDB storage engine, the database file types include .frm, ibdata1, and .ibd, and there are two storage locations.

The default location for .frm files is

C:\Documents and Settings\All Users\ApplicationData\MySQL\MySQL Server 5.1\data, ibdata1, .ibd

The default location for the file is the data folder under the MySQL installation directory.

Knowledge point expansion:

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%";

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!

This is the end of this article about where MySQL data is stored. For more information about where MySQL data is stored, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Detailed steps for migrating the data folder of the MySQL database
  • Specific steps to change the storage location of the Mysql database

<<:  JavaScript file loading and blocking issues: performance optimization case study

>>:  Comparison between Redis and Memcache and how to choose

Recommend

VMware virtual machine installation Linux system graphic tutorial

This article shares the specific steps of VMware ...

Making a simple game engine with React Native

Table of contents Introduction Get started A brie...

Tutorial on deploying the open source project Tcloud with Docker on CentOS8

1. Install Docker 1. I installed Centos7 in the v...

How to capture exceptions gracefully in React

Table of contents Preface ErrorBoundary Beyond Er...

Two ways to open and close the mysql service

Method 1: Use cmd command First, open our DOS win...

Explore the truth behind the reload process in Nginx

Today's article mainly introduces the reload ...

Detailed explanation of the usage and difference between nohup and & in Linux

Example: We use the Python code loop_hello.py as ...

HTML uncommon tags optgroup, sub, sup and bdo example code

Optgroup is used in the select tag to make the dro...

Specific use of CSS front-end page rendering optimization attribute will-change

Preface When scroll events such as scroll and res...

Detailed explanation of error handling examples in MySQL stored procedures

This article uses an example to describe the erro...

W3C Tutorial (14): W3C RDF and OWL Activities

RDF and OWL are two important semantic web techno...

How to hide elements on the Web and their advantages and disadvantages

Example source code: https://codepen.io/shadeed/p...