Query against MySQL to tell where the files for the tables are.
Hello all,
I used to know a query in Oracle that did this, but I would like one in MySQL. What I would like is this. I would like a query that told me the location and the names of the files where actual data in a mysql db stored on a linux server. My plan is this. Find out where the data is stored, bring down the MySQLd and then back up the data files. In case of catastophic failure, I hope to be able to restore the data. Regards, Raj Upadhyaya |
no need to interrogate mysql with this task...
Code:
grep -iw datadir /etc/my.cnf |
Cool! Should I back up everything in this directory? Is there a way I can keep the storage some where else (I think it is in the root file system for my server, which is pretty small.)
- Raj Upadhyaya |
Use the mysqldump cmd; it'll give you a consistent backup without having to shutdown MySQL, and you can choose exactly what you want backed-up.
http://www.day32.com/MySQL/ https://dev.mysql.com/doc/refman/5.1...-recovery.html |
All times are GMT -5. The time now is 09:25 AM. |