Moving MySQL

 

Related Docs:   MySQL Server

To move the MySQL server from one physical box to another, you need to do the following:

  1. Prepare a new box with MySQL using H-Sphere installer.
  2. Using E.Manager, create a new physical server and add the MySQL group (or add this group to the physical server you are planing to move MySQL server to).
  3. Stop the Control Panel.
  4. In the H-Sphere database, run the following commands:
    update l_server set p_server_id=[new_p_server_id] where id=[id_of_MySQL_logical_server];
    (1 record)
    update l_server_ips set ip='[new_MySQL_server_IP]', mask='[new_MySQL_server_mask]' where l_server_id=[id_of_MySQL_logical_server] and flag=4;
    (1 record)
  5. Start the Control Panel.
  6. Stop MySQL.
  7. Run 'su - mysql' to land into mysql user directory, then run 'pwd' to get mysql home dir location; move this directory to the new server (including mysql database and .my.cnf file.).
  8. Start MySQL on the new server.
  9. Change the IP in A DNS record for MySQL server in service DNS zone (using Control Panel).
  10. Change the IP of MySQL server in phpMyAdmin configuration ($cfgServers[$i]['host'] in in the config.inc.php file in PhpMyAdmin directory; $i is the number of the MySQL server in PhpMyAdmin configuration: $i=1,2,...).
  11. Change the IP of database server in all user scripts which access the MySQL databases via IP address.
  12. After the IP change, MySQL hostname will still resolve to the old IP address during the propagation period. To avoid this problem, install and configure TCP proxy on the old server.

Related Docs:   MySQL Server







Home   Products   Services   News
© Copyright. . PSOFT. All Rights Reserved. Terms | Site Map