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