Casey Neistat
Casey Neistat

Reputation: 81

MySQL does not seem to store databases anywhere

The MySQL command line works fine and connects well to PHP. However, the databases don't seem to be stored anywhere in the computer. I tried looking in C:\Program Files\MySQL\MySQL Server 5.7\ for the data folder, but there is none. I don't know if this is actually a problem or not but it is worrying me. Any help would be greatly appreciated.

Upvotes: 1

Views: 65

Answers (3)

srd091
srd091

Reputation: 55

You can execute the following command to get location of data folder

SHOW VARIABLES WHERE Variable_name LIKE '%dir'

Upvotes: 0

Bill Karwin
Bill Karwin

Reputation: 562931

Get to your MySQL command line and run this query:

mysql> select @@datadir;

That's the location on your computer where it stores databases. The location can vary based on your configuration, but the query above will always tell you where it is.

Upvotes: 1

mkysoft
mkysoft

Reputation: 5758

Check programdata folder: C:\ProgramData\MySQL

Upvotes: 0

Related Questions