Find the data directory of your MySQL server

Note Statistics

Note Statistics

  • Viewed 81 times
Sat, 09/26/2020 - 10:26
  1. Login into your MySQL instance.
  2. Type and execute the query below.
select @@datadir;

When executing from the command line you might get something similar


mysql> select @@datadir;

// Output
+-----------------+
| @@datadir       |
+-----------------+
| /var/lib/mysql/ |
+-----------------+
1 row in set (0.00 sec)
Authored by
Tags