Common Database-related operations

Source: Internet
Author: User

Common Database-related operations

Common Database Operations:

 

1. Import and export data



Method 1:

1. Export query results: select statement into outfile 'Save path + file'
2. Import query results: load data local infile 'Storage path + file name' into table indicates character set utf8;
3. Import query results: import the formatted file to the mysql table: mysqlimport [Options]Db_name Textfile1[Textfile2...] See: https://dev.mysql.com/doc/refman/5.7/en/mysqlimport.html
4. Import query results: source command: source 'file path + filename 'see: https://dev.mysql.com/doc/refman/5.7/en/mysql-batch-commands.html


Method 2:

Export query results:
1. mysqldump command: mysqldump [options]> dump. SQL see: https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html



 

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.