I am using MySQL Administrator for making my database backup. I can perfectly back up the whole database with all its tables. There are some tables whose size is very big so I wonder if I could only back up the tables' structure (only their elements) but not their data.
Use the
--no-data
switch with mysqldump to tell it not to dump the data, only the table structure.This will output the CREATE TABLE statement for the tables.
Something like this
To target specific tables, enter them after the database name.
http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_no-data
http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html
as LukeR said, the --no-data option to mysqldump will do what you want.
to add to that, here's a backup script i wrote that dumps all mysql databases to plain text files, and creates separate dump files for each database's table schema and data (it's quite common to want to restore or create the tables on another mysql server WITHOUT the data, and that's a lot easier to do when you already have a small file with just the CREATE TABLE/CREATE INDEX etc commands)
You can also manually do this through the
mysql
commandline interface by doing aDESCRIBE <tablename>
and copy/pasting the results.