Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Are MySQL databases always stored in /var on CentOS?

Specifically - If a new CentOS/cPanel server that needs to support MySQL, doesn't have that partition, but only has these, does that mean MySQL data is somehow being stored in a temporary dump somewhere?

/dev/sda3              /
tmpfs                  /dev/shm
/dev/sda1              /boot
/usr/tmpDSK            /tmp
share|improve this question
    
The data directory can be relocated if you really want/need to do that. So it may not be always stored under /var, but that is the standard location. –  Zoredache Jun 23 '10 at 7:22
    
Are there advantages to storing MySQL on /var ? –  inac Jun 29 '10 at 9:17

2 Answers 2

up vote 3 down vote accepted

In your case /var is stored on /dev/sda3 as a subdirectory of /.

The default datadir for MySQL is /var/lib/mysql and as long as you do not change the configuration, the database files are stored in this directory.

share|improve this answer

In *nix, if a directory is not a separate mount then it is part of its parent mount. In this case, /var is considered part of /.

share|improve this answer

Your Answer

 
discard

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.