[CentOS] mysql data
Ray Leventhal
centos at swhi.net
Tue Apr 1 16:32:00 UTC 2008
Barry L. Kline wrote:
> Ray Leventhal wrote:
>
> | Where does mysql actually store databases and tables in the filesystem?
>
> If you're asking because you're concerned about backup/restore then
> you'll want to forget about the location of the data files and instead
> use the mysqldump command to make your backups.
>
> If you're interested from the capacity planning standpoint then the
> answer is that CentOS configures MySQL to live in the /var/lib/mysql
> directory.
>
> Barry
Thanks to all who replied. My reason for wanting to know the location
of the actual databases and tables is that I had a crash and rebuilt a
new system. I hadn't done mysqldump(s) of the databases recently enough
to the crash to be useful, so I am going to temporarily mount the drive
that contained /var from the old system (thankfully, that partition is
sound) and just pull that data out.
/var/lib/mysql is the answer I needed. I've since implemented a backup
strategy which I found online [1]. The only difference between what I
am running and the posted script is the location of the mysqldump file.
In the example it's in /usr/local/bin, in Cent it's in /usr/bin
Kind regards,
-Ray
[1] http://www.tech-recipes.com/mysql_tips221.html
More information about the CentOS
mailing list