Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where do the MySQL database files reside for WAMP?

I'm just curious as I am beginning to learn PHP and MySQL, as to where the database and other files of MySQL reside on the hard drive. I have installed WAMP on a Windows XP SP2 platform.

like image 477
Abhishek Avatar asked Apr 28 '10 08:04

Abhishek


People also ask

Where is MySQL database stored WAMP?

So in yours they would be in E:\wamp\bin\mysql\mysql-version\data . You can start mysql locally from E:\wamp\bin\mysql\mysql-version\bin , where all the executables are.

Where are MySQL database files stored?

The default data directory location is C:\Program Files\MySQL\MySQL Server 8.0\data , or C:\ProgramData\Mysql on Windows 7 and Windows Server 2008. The C:\ProgramData directory is hidden by default.

Where is the database stored in phpMyAdmin?

Your phpMyAdmin files are located in the /usr/share/phpmyadmin/ directory.


2 Answers

Explore variables from the output of following command:

mysql> show variables like '%dir%';

like image 174
kv. Avatar answered Sep 17 '22 12:09

kv.


Data directories for mysql database :

Generally,

Windows wamp setup : mysql/data Linux (Ubuntu) : /var/lib/mysql

Configured Location: [ my.cnf configures it as datadir ]

Linux :

$ cat /etc/mysql/my.cnf | grep 'datadir'

Windows :

  Open mysql/my.cnf (search for `datadir` )

From mysql prompt : ( mysql> ) [ PREFERRED WAY ]

  mysql> show variable like 'datadir';

I suppose that covers pretty much all cases.

like image 36
Yugal Jindle Avatar answered Sep 21 '22 12:09

Yugal Jindle