In linux, the mysql database is imported and exported.

Source: Internet
Author: User

In linux, the mysql database is imported and exported.

Objective: To import data from mysql on the server to a Local Machine

Device: Local: Mac. Remote Server: linux

Log on to the server using ssh

Mysqldump-u [username]-p [database_name]> [/path/dumpfilename. SQL]

For example, 'mysqldump-u root-p mywordpress>/var/mywordpress. SQL

Use the software filezilla on Mac to download mywordpress. SQL exported in step 1 to your local device.

Mysql-u [username]-p [database_name] <[dumpfilename. SQL]

Specifically, database_name must be an existing database in the local database, such as creating a new database.

Articles you may be interested in:
  • How to easily Import and Export MySQL Databases on Linux VPS/Server
  • Mysql import and export tool Mysqldump and Source command usage details
  • Summary of Solutions to Chinese garbled characters in mysql import and export data
  • MySQL Database Export and Import and common error Solutions
  • How to solve Chinese garbled characters in the csv file imported and exported by Mysql
  • How to import and export databases and data tables from mysql
  • Detailed description of mysqldump backup restoration and mysqldump Import and Export Statements
  • How to use MySQL to import and export commands for Backup Recovery

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.