Where are the MySQL database files stored? How to view a local MySQL database

 shenxiaocen November 25, 2022 13:44:17 operating system comment eight hundred and seventy-five Reading mode

For some people, it is only a matter of seconds to view the local MySQL installation path and the MySQL version. Just enter the MySQL command in the command window, and then do not configure the path of the executable file of the MySQL installation directory in the environment variable. In fact, it is very simple, but the actual operation is at a loss, Where are the MySQL database files stored?

mysql数据库文件存放在哪里?如何查看本地mysql数据库

Where are the MySQL database files stored?

In the IIS platform under xp, it is generally in the data folder under the installation directory,

Or in C: Documents and Settings All Users Application Data MySQL MySQL Server 5.1 data

(Your name may be C: Documents and Settings All Users Application Data MySQL MySQL Server 5.0 data

The data file of MySQL under Linux or Windows is under datadir,

Execute show variables like '% datadir%' in the database;

The path of the database file will be displayed, and you can find the ac folder

Description The ProgramData folder is a hidden attribute by default, and the files under it must be displayed.

Specific method 1: Tools - Folder Options - View - Hide all files and folders under Files and Folders.

Specific method 2: View - hidden items.

Then you can see the database file.

How to view a local MySQL database?

In fact, the method is very simple. Just log in to the MySQL client and enter the command: show variables like "% char%";

To view the MySQL version:

1. After connecting to MySQL, enter status to view the version information, version.

2. Enter s to achieve the same effect as the previous step

3. Directly use the SQL statement to view select version() from dual;

How can I view the local database name?

1. Use the select database () statement;

2. With the status statement, one of the queried results is the current database: * * *. Here * * * is the name of the current database.

In fact, when you enter the directory of the specified database, you can see the tables of the database. Under the default MySQL engine, each table consists of three files with the same name but different suffixes., Here you can also see the database name and other information.

 shenxiaocen
  • This article is written by Published on November 25, 2022 13:44:17
  • This article is collected and sorted by the website of Mutual Benefit, and the email address for problem feedback is: wosnnet@foxmail.com , please keep the link of this article for reprinting: https://wosn.net/12442.html

Comment