Mysql Database Import and Export and functions, stored procedures mysql commonly used export data commands: 1. mysql exports the entire database www.2cto.com mysqldump-hhostname-uusername-ppassword databasename> backupfile. SQL mysqldump-hlocalhost-uroot hqgr> hqgr. SQL (if the root user does not use the password, you can not write-p. Of course, you can create a path for the exported SQL file and store it in the bin directory of mysql if it is not specified) 2. mysql exports a database table mysqldump-hhostname-uusername-ppassword database tablename> the exported file name mysqldump-hlocalhost-uroot hqgr t_ug_user> user. SQL 3. mysql exports a database structure mysqldump-hhostname-uusername-ppassword-d -- add-drop-table databasename> d: hqgrstructure. SQL-d has no data -- add-drop-table adds a drop table 4 before each create statement. if you need to export functions or stored procedures in mysql, mysqldump-hhostname-uusername-ppassword-ntd-R databasename> backupflie. SQL mysqldump-hlocalhost-uroot-ntd-R hqgr> hqgr. in SQL www.2cto.com, "-ntd" indicates the export stored procedure; "-R" indicates the command used to export data from mysql: 1. mysql Command mysql-hhostname-uusername-ppassword databasename <backupfile. SQL 2. source command mysql> source backupfile. SQL from space of sxyliu520