备份时,若要导出存储过程和函数,需要加-R参数,若不需要导出数据,只是表结构,需要加-d参数。 mysqldump -hlocalhost -uroot -proot -d -R cms > cms_20071226.sql