Web Hosting Talk







View Full Version : mysql database question for Plesk


jsonline2k3
10-07-2004, 02:08 PM
I have about 7 databases linked to 1 domain, I need to move them because I will be removing the domain. How do I go about moving the databases to another user in plesk on the same server? Should I just back them up, delete them, remake them on the other domain and then import them?

I would think there is an easier way to do this such as changing something in a config file or what not for that database?

davila
10-08-2004, 03:34 AM
The solution is very simple. Actually there are two tables (db_users and data_bases) in psa database to deal with.

Assumming you want to move 'db_name' database to 'new_domain' of Client1 then just determine 'new_domain_id'
select id from domains where name='new_domain'
and then
update data_bases set dom_id=new_dom_id where name='db_name'

good luck

Webbase
10-08-2004, 06:19 AM
I believe you can just leave them and the new domain can connect using the existing db name / authentication.

Least you could on Plesk 6....

jsonline2k3
10-08-2004, 02:04 PM
Thanks everyone. With Plesk 7 (at least so far) when you delete the domain the DB's tied to it go as well. I am sure the way noted above will work ... I just have to find the time to get to it now.