Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to know where the database files are located when using directadmin. I use phpmyadmin to create the databases. When I check /var/lib/mysql directory I cannot see the database I created. But when I use the locate command, I found out the database is /var/lib/mysql.backup. I find it odd.

Can somebody inform if the /var/lib/mysql.backup directory is where directadmin naturally store the databases created using phpmyadmin. Or my mysql database is messed up.

share|improve this question
up vote 2 down vote accepted

I am very much sure that no process could change the location of the DB files and they will be created only at the location where mysql data_dir is set.

So, if your mysql data directory is /var/lib/mysql, then any DB created by any way will be created into that directory only.

share|improve this answer
How do I know the data_dir value? - @GeekRide – Pelang Dec 13 '12 at 10:07
Run this command on the MYSQL prompt ... show variables like "datadir";. It will show you the value of data directory. – GeekRide Dec 13 '12 at 10:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.