[BUG] move_domain.sh

ISOS6

Verified User
Joined
May 7, 2009
Messages
322
Location
Erbil, Tarin Hills, Iraq
Hi,

This script does not move databases.

Or

Maybe in control panel not visable due different usernames. So you are not able to see either from old og new user.
 
Hello,

That's already been discussed on these forums. That's how the script works, and other is not designed yet.
 
Databases, just like cronjobs, are linked to a User, not a domain.
Meaning, there is nothing specific in them that requires them to go with a domain.
You could have many domains, and one database.. and they all use it.
That's why a database is not moved when you move a domain.

A database is moved when you change a Username..
Also, there is a script to move a database to a different User (called by the change_username.sh script)
/usr/local/directadmin/scripts/change_database_username.php

with a newer version that uses the "RENAME TABLE" to move tables to a different User's database (safer than renaming the mysql directory.. even though it works in most cases)
files.directadmin.com/services/all/change_database_username.php

You can use the script manually, eg:
Code:
cd /usr/local/directadmin/scripts
VERBOSE=1 DBUSER="da_admin" DBPASS="[B]password[/B]" USERNAME="[B]oldusername[/B]" NEWUSERNAME="[B]newusername[/B]" /usr/local/bin/php /usr/local/directadmin/scripts/change_database_username.php
of course, it moves all databases from oldusername to newusername.. so may not be exactly what you're after.

John
 
Back
Top