Full export Import implementation method under Mysql _mysql

Source: Internet
Author: User
Tags mysql version phpmyadmin
Yesterday afternoon to help carp to a large group purchase site Transfer Database server, this article should have been transferred yesterday after the summary issued, but for some reason did not write in time, now quickly fill up.
First of all, the environment is like this, the old database server MySQL version 5.0 centos system no Web, no FTP, new database server mysql5.1 CentOS nginx.
See this environment first idea is through phpMyAdmin import export, but the original database server has no web environment, the other database files about 300M, only rely on phpMyAdmin cannot import.
Down ready to stop MySQL, pack the database directory, and then overwrite the new server in the database directory, but the carp tried to say the copy used to have a problem with the table, so this method also give up.
Finally go to the old server to use the command
Copy Code code as follows:

Mysqldump-u user name-p database name > database name. sql


Export to a. sql file, and then zip-compress, transfer to the new database server via another server SSH (SCP), and import through the following statement (this can use the Mysqldump-u user name-p database name < database name. SQL but want to see execution progress, So the following actions are performed)
Copy Code code as follows:

Mysql-u root-p
Mysql>use Database
Mysql>source/data0/tuan/tuan.sql


So import SSH entry will be a lot of, recommend looking for Windows Server hanging ssh to execute, I use the company network bandwidth run full 4M, occupy my full speed.
So far the database transfer has let me nagging, not too many technical things, just to their own record, to avoid forgetting, warm so know new.
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.