Mysql Data Backup or transfer (1) -- transfer through data replication

Source: Internet
Author: User

Before introducing this method, we would like to remind you that the best way to transfer data is:

Export the SQL file on the original MySQL server and then import data on the new MySQL server.

However, since our original server has been uninstalled, we must use the following methods.

Let's talk about how MySQL stores data:

MySQL does not store data in the same way as SQL Server (one data file and one log file. When creating a database in MySQL, create a folder named after the database in the data folder for the database. Note that this folder only stores the table structure of the database, the data is not stored. Where is the data? There is an ibdata1 in the data folder. Check the file size. You can see that MySQL stores all the data in this file.

Data Recovery Method:

After understanding the above principles, we should know how to restore data, because we think MySQL stores data like sqlserver, therefore, we copied the folder where the original database was located to the data directory. Because no data was copied, MySQL prompts that your data does not exist and then copies the ibdata1 file, OK.

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.