Now available in Cloud Sites MySQL 5.1!
Read on to learn the process of migrating your current Cloud Sites running MySQL 5.0 to begin running on a MySQL 5.1 database.
Migrating your sites to a newer version of MySQL will require a maintenance period during which your sites will be unavailable. To minimize the impact of the migration, you just need to plan ahead and control the timing and presentation of your site during the process.
Please read the easy-to-follow, five-step process below for migrating a MySQL 5.0 database to a MySQL 5.1 database:
Step 1 Close the Blinds and Lock the Doors
A. Begin by putting up a splash page on your site stating that you are currently migrating and then revoke all user access to the database to be migrated.
B. You can successfully revoke access to the database by using your administrative privileges to rename the configuration file containing your database link information to a filename with the .mig extension. An example would be naming the config.php file to config.php.mig.
C. Once the filename is changed wait for user transactions to be completed or kill them. Threads can be killed with the KILL statement. To learn more, consult the MySQL documentation from the MySQL website and see the section 18.104.22.168 - KILL Syntax. To determine if all user connections have been completed or successfully killed, use the command SHOW FULL PROCESSLIST. To learn more about this command, please consult the MySQL documentation from their website and look for the section 22.214.171.124 - SHOW PROCESSLIST Syntax.
Step 2 Back it Up!
A. Proceed to back up your current MySQL 5.0 database. You may wish to use the the process we describe in the Knowledge Center article: "How to backup your MySQL database with phpMyAdmin."
Step 3 Create Your New Database
A. You will next need to provision a new MySQL 5.1 database to contain the newly migrated database.
B. Do this by following the instructions in our Knowledge Center article: Adding a MySQL Database.
Step 4 Import Your Saved DB Backup
A. The next step is to import your saved database backup into your newly provisioned MySQL 5.1 database.
B. You should be able to use the PHPmyAdmin Database Management Interface to handle imports for databases which are less than 16MB in size without issue. There may be times where you need to import more than 16MB of data, in which case you should follow the directions in the Knowledge Center article, "How to Import a Large MySQL Database."
Step 5 Update Your References
A. Finally, you will need to modify all references in your code/configuration files from the old database server host name, IP address, username, and password to the respective new locations and values on the newly provisioned and migrated database server.
B. Rename the config file back to its original name without the .mig extension.
C. Assuming your new user information is valid, the site should begin processing against the new database in the same manner as before.
BACK TO KNOWLEDGE BASE TABLE OF CONTENT
*CyberSite.net takes no responsibility whatsoever for any files, code, content, database back-ups that are not made and/or are not made/done correctly. The information included on this knowledgebase page is usual and customary DB back-up procedures, but may not be complete. It is the client's responsibility to ensure that their site material is correctly backed-up. If a client prefers to make other arrangements or methods for backing up site material, it is at their sole discretion. CyberSite.net always recommends that client back-up their entire site on a regular schedule.