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.
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.
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.
Your phpMyAdmin files are located in the /usr/share/phpmyadmin/ directory.
Explore variables from the output of following command:
mysql> show variables like '%dir%'
;
Data directories for mysql
database :
Windows wamp setup
: mysql/data
Linux (Ubuntu) : /var/lib/mysql
my.cnf
configures it as datadir
]Linux :
$ cat /etc/mysql/my.cnf | grep 'datadir'
Windows :
Open mysql/my.cnf (search for `datadir` )
mysql
prompt : ( mysql>
) [ PREFERRED WAY ] mysql> show variable like 'datadir';
I suppose that covers pretty much all cases.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With