Mysql Database Import and Export, functions, and stored procedures

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.