HI folks,
Apologies if this is OT. If it is, please msg me offllist and I'll carry on my searching elsewhere.
Where does mysql actually store databases and tables in the filesystem?
Thanks in advance -Ray
Ray Leventhal wrote:
HI folks,
Apologies if this is OT. If it is, please msg me offllist and I'll carry on my searching elsewhere.
Where does mysql actually store databases and tables in the filesystem?
depends on where you set it up to store those things. a cursory google for mysql config will give you the details.
and you can start by looking at /etc/my.cnf
On Mon, Mar 31, 2008 at 5:17 PM, Ray Leventhal centos@swhi.net wrote:
HI folks,
Apologies if this is OT. If it is, please msg me offllist and I'll carry on my searching elsewhere.
Where does mysql actually store databases and tables in the filesystem?
Thanks in advance -Ray
If you're using the stock settings from an RPM, probably in /var/lib/mysql
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
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
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