MYSQL database migration process

Source: Internet
Author: User
I. Brief Description: With the gradual popularization of the PHP + MYSQL architecture, more and more applications are now using the MYSQL database, which has been unanimously recognized by users based on its simple and efficient features, however, the data migration and Encoding Problems Encountered during use have also caused headaches for many developers, let alone common users. The purpose of this tutorial is to help ordinary users to simplify as much as possible

I. Brief Description: With the gradual popularization of the PHP + MYSQL architecture, more and more applications are now using the MYSQL database, which has been unanimously recognized by users based on its simple and efficient features, however, the data migration and Encoding Problems Encountered during use have also caused headaches for many developers, let alone common users. The purpose of this tutorial is to help ordinary users to simplify as much as possible

I. Brief Introduction:

With the gradual popularization of the PHP + MYSQL architecture, more and more applications are now using the MYSQL database, which has been unanimously recognized by users based on its simple and efficient features, however, the data migration and Encoding Problems Encountered during use have also caused headaches for many developers, let alone common users.
This tutorial aims to help normal users migrate MYSQL Data as easily as possible, that is, migrating data from other VM service providers to the MYSQL database in the VM room. Because of the complexity of its Mysql version and encoding, it cannot cover all aspects. If you still cannot migrate or encounter garbled characters after following this tutorial, contact the technician for support.

1. MYSQL version problems, each software upgrade will bring new features, but there will inevitably be a database format compatibility problem, it is difficult to fully understand all versions, however, we must at least understand that the current database version number is 3. X or 4. X or 5.x. In addition, the formats of 4.1 and 4.0 are quite different.

2. Encoding Problems. In the past 4.1 (excluding 4.1), the default encoding of the database was lartin, and the default encoding was utf8, but the commonly used encoding was GBK, which involved too many links. There are web pages, connections, storage, queries, and so on. Any inconsistency in encoding may cause garbled characters. If you want to migrate data between different platforms and versions without any garbled characters, you have to be lucky.

Ii. Preparations before migration:

1. Obtain the database provided by the original service providerServer IP Address,Database username,Database Password,Version NumberAndAllow remote connection.
If the original database does not support remote connection, upload the "Empire backup King" to your original space and then follow the instructions below, after the backup is successful, you need to download and upload all the directories of the "Empire backup King" to our virtual host, and then follow the steps of "data recovery.
2. Activate MYSQL database in our company. At this time, you will obtain the database provided by our companyServer IP Address,Database username,Database Password.
Pay attention to the version number when activating. If the previous version is 5.x, You must select the database 5.x In the VM room; otherwise, the transfer will fail.
3. You have at least one virtual host in our company.

Iii. Operation Details
The quality of the tool determines the quality of data migration. Here we recommend a backup and restoration tool developed by the PHP program. This tool is simple. Data is backed up or restored. However, because of its good encoding and automatic version recognition and conversion functions, it will be of great help to solve Garbled text. Therefore, the migration process is the process of operating the software.
1. Software Installation (assuming that you have activated a VM in our company)
A) log on to our website, go to the management center, click VM management, and find Remote File Download ()
  


B) Keep the default/wwwroot/directory unchanged. Before "add download task", enter "url/xxx.rar" and click "add download task ", press F5 to refresh the page later until the "Download Status" changes to "download completed". The process is estimated to take about 5-10 minutes ()

C) after the file is downloaded, go to "compression/decompression" () in host management "()


Dashboard selects the downloaded file named "Unzip ebak.rar" in the compressed file. The decompression path remains unchanged by default. "/wwwroot/", and click extract. ()

E) after completing the preceding steps, enter http: // The third-level domain name/ebak corresponding to the VM. If not, check whether the preceding operations are successful. The purpose of this operation is to install the PHP program "Empire backup". If you download it on the Internet and upload it through FTP, the effect is the same ()

2. Software Configuration
Enter three http: // virtual host domain name/ebak (for example), enter admin In the username field, enter 123456 in the password field, and click Login, the system automatically enters the "database Settings" interface ().



The database setting information must be filled in correctly; otherwise, data cannot be migrated successfully, and the key items have been marked with red lines.

1. MYSQL version: You must select the correct version. If you do not know the version number, contact the original service provider. For example, if your MYSQL version is MYSQL5.0.22, you should select MYSQL5 .*
2. Database Server: the IP address of your database at the original service provider. If you are not clear about the IP address, contact the service provider and ensure that the database is accessible remotely.
3. database username: MYSQL username of the original database
4. Database Password: the logon password of the original database.
5. default backup database: enter the name of the original MYSQL database.

After entering the information, click "Submit". If the message "setting parameters successful" is displayed, the information is correct. If you are prompted that you cannot connect to the server, the entered server address or password may be incorrect, or the original MYSQL is 5.0, but we have activated the mysql vm in our company.

3. Back up data
After setting the parameters, click "Backup Data" on the left of "Empire backup" to go to the "backup parameter settings" Page. Although there are many parameters, but you almost don't need to change anything. The only thing you need to do is remember the Backup Directory and click "Start backup. ()

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.