Mysql import and export data structures and Data

Source: Internet
Author: User
Tags mysql import

Mysql data import and export structure and data method 1: mysqldump-ukevin-P3306 -- default-character-set = utf8-p-h10.1.15.123 activity sign_in_user> user. the SQL export result contains the table creation script and data that has been inserted. SQL format. Import Data mysql> use activity; mysql> source user. SQL; Method 2: mysql-uactivity-P3306 -- default-character-set = utf8-p-h10.2.8.13-e "select user_id, mac, phone from activity. sign_in_user "> user. SQL exports columns that store data content. Does not contain the table structure imported data load data infile "/root/user. SQL "into table activity. sign_in_user; if you run the preceding import, ERROR 13 (HY000): Can't get stat of '/root/user is returned. the reason why SQL '(Errcode: 13) uses the/tmp directory is that mysql uses/tmp as the temporary read/write directory by default. load data infile "/tmp/user. SQL "into table activity. sign_in_user; Query OK, 25 rows affected, 5 warnings (0.00 sec) Records: 25 Deleted: 0 Skipped: 0 Warnings: 2

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.