On 2 Oct 2007, at 2:12 pm, Chris G wrote:
I need to find a database! :-)
On my Slackware installation I had (well, still have if I start it) a database called 'addresses'. I want to copy it across to the Fedora installation so that mysql on Fedora can see the database. However I can't find the database.
I've tried 'locate addresses' but nothing there looks remotely like a database file (or files).
I suspect that mysql buries all of its databases in one big file somewhere but what's it called?
On debian in /var/lib/mysql is a folder for each database, which then has a bunch of files in it that relate to the database.
However, I wouldn't suggest copying the databases this way, better to dump them from the old install and then import them on the new:
$ mysqldump -u dbuser -p dbname > dbname-$(date +"%Y%d%m").sql
$ mysql -u dbuser -p dbname < dbname-$(date +"%Y%d%m").sql
(Creating the database first, obviously)
Thanks,
David