Author
Topic: Feature Request - Database relocation (Read 7432 times)

Ah, but you are moving the database location on the core, we are not talking about moving the daemon (server). The servername for all the scripts and programs is the core, whether it is referenced as 127.0.0.1,

You may be leaving the server in the same location, but I'm not

I'd like to have the DB running on a server which is already running both MySQL and PostgreSql, and which already has a both a tape drive and a backup plan running. Makes my maintenance easier, and also means I can nuke my system without hesitation when upgrading either software or hardware. I realise this is not for everyone, though.

Ah, but you are moving the database location on the core, we are not talking about moving the daemon (server). The servername for all the scripts and programs is the core, whether it is referenced as 127.0.0.1,

You may be leaving the server in the same location, but I'm not

I'd like to have the DB running on a server which is already running both MySQL and PostgreSql, and which already has a both a tape drive and a backup plan running. Makes my maintenance easier, and also means I can nuke my system without hesitation when upgrading either software or hardware. I realise this is not for everyone, though.

It might not be for everyone, but neither am I . Let me know how it goes, and if you want to collaborate on the switchover. Especially if you want to work on some way to base LMCE's data in Postgres, whether or not you keep MySQL. That's what I want too, but I can't prioritize working on it directly.

*****Before dumping bring the database offline so no one can use it.*****Otherwise you may have doom and disasterI recommend unplugging the cable from all NIC(s) during the mysqldump process.I assume NO LIABILITY of any kind, but I have done this before for other programs.

There is a command line switch to dump all databases, but I forgot what that was try mysqldump --help.(something like --all-databases)

You may/or may not have to add "connect <database name>;" as the first line of code. If you use the all switch you won't have to, but if you use the "all" you could wipe out existing username and passwords if your not careful. ***If both systems have a user joe some of the data could be overlayed especially the password.*****Other bad things can occur****

copy linuxmce-backup.sql to your other machine.

I also recommend(strongly!!) using the same procedure to back up your other database in case something goes horribly wrong.

You need to find and use the "all database" switch for your original database, on the destination pc, because that will backup usernames,passwords, and permissions.

If something goes horribly wrong you'll be glad you backed up.---In case of doom as disaster:----------mysql -u root -pdelete each affect database one at a timecommit;exit or bye I forget which.mysql -u root -p <database name> </path-of output/orginal-db-on-destination-pc.sqlSpecify credentials and wait for the process to complete.You are now restored---End of doom and disaster---------------

I have no idea where the setting is located, but all thats left is to change the IP address that LinuxMCE is trying to connect to from localhost to the ip address of your other machine and your done.Assuming you found this location you and now migrated.

I have no idea where the setting is located, but all thats left is to change the IP address that LinuxMCE is trying to connect to from localhost to the ip address of your other machine and your done.Assuming you found this location you and now migrated.

If you can't find the setting, use iptables to generate a NAT rule to foward the traffic. If you don't know iptables use Firewall builder(30 day trail ediition) from fwbuilder.com to generate the necessary rules yourself the necessary iptable's settings through a nice windows GUI. Route any "source" with 127.0.0.1 as the destination and 3306 as the service to the ip address of the new database with the original service. Then save and compile. You will get a .fw file which you can execute in a terminal window on your LinuxMCE box. The script will have to be executed upon any reboot of the box.