I want to download/backup the schema of an entire MySQL database. Is there a way to easily do this? I haven't had much luck using a wildcard, but that could be an error on my part.
+4
A:
How about using mysqldump?
mysqldump -u root -p[password] [db_name] > backupfile.sql
mganjoo
2010-08-10 02:15:36
+1
A:
Login as root, then
show databases; # lists all databases
use information_schema; # connect to the mysql schema
show tables;
select * from tables;
Everything you need is in the information_schema schema. If all you want to do is backup the db, use the builtin dump/restore capabilities.
Jim Garrison
2010-08-10 02:15:37