To move the MySQL server from one physical box to another, you need to do the following:
- Prepare a new box with MySQL using H-Sphere installer.
- 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).
- Stop the Control Panel.
- 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)
- Start the Control Panel.
- Stop MySQL.
- 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.).
- Copy the directory /hsphere/shared/apache/htdocs/phpMyAdmin to the new server.
- Start MySQL.
- Change the IP in A DNS record for mysql server in service DNS zone (using Control Panel).
- Change the IP of MySQL server in phpMyAdmin configuration.
- Change the IP of database server in all user scripts which access the MySQL databases via IP address.
|