
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
Where is the MySQL table data stored in Windows?
In order to know the location of MySQL table data, you can use the below syntax −
select @@datadir;
You can also use SHOW VARIABLES command for this. Following is the syntax −
show variables where Variable_name ='datadir';
Let us implement the above syntaxes to know where MySQL table stores data −
mysql> select @@datadir;
This will produce the following output −
+---------------------------------------------+ | @@datadir | +---------------------------------------------+ | C:\ProgramData\MySQL\MySQL Server 8.0\Data\ | +---------------------------------------------+ 1 row in set (0.00 sec)
Here is the alternate query to know where MySQL table data stored −
mysql> show variables where Variable_name ='datadir';
This will produce the following output −
+---------------+---------------------------------------------+ | Variable_name | Value | +---------------+---------------------------------------------+ | datadir | C:\ProgramData\MySQL\MySQL Server 8.0\Data\ | +---------------+---------------------------------------------+ 1 row in set (0.23 sec)
Now follow the above path to reach where MySQL table is stored. Following is the screenshot displaying the location for tables −
- Related Articles
- Insert data in a table in MySQL stored procedure?
- Where is MySQL bin directory located in Windows OS?
- How to repeat the values stored in a data column of MySQL table?
- How to apply EXTRACT() function with WHERE Clause on the dates stored in MySQL table?
- How to select data from a table where the table name has blank spaces in MYSQL?
- Working with WHERE IN() in a MySQL Stored Procedure
- Where is VKORG stored in SAP
- How can we write MySQL stored procedure to select all the data from a table?
- How can we create a MySQL stored function that uses the dynamic data from a table?
- MySQL Stored Procedure to create a table?
- Insert the data into Table C IF The data is not in Table B while Comparing to Table A in MySQL?
- How do we count the records from MySQL table where column holds duplicate/triplicates data?
- Display table records from a stored procedure in MySQL
- What Information is Stored in the Symbol Table?
- Update data in one table from data in another table in MySQL?

Advertisements