mysql -u username -p -h localhost data-base-name < /path/to/data.sql
where username and data-base-name need to be replaced with variables, per haps ${USER}
or leave out the data-base-name if no variable is known.
Im not sure the variables will work though
You can make this a shell script and run it after the server is created.
Per haps someone else can shed more light on this
System Settings->Module Configuration->Actions upon server and user creation
Command to run after making changes to a server
The script can be anywhere on the system…you provide the full path.
You’ll need to check the ENV variables to decide when to create the database (obviously, you don’t want to create it when modifying or deleting; there’s a variable for this in the ENV for your script, along with all of the variables found in the configuration for that particular domain, including the username and database name and such).
I don’t recall off-hand what that variable is, and the online help (surprisingly and embarrassingly) doesn’t mention it. I’ll fix that shortly.
But, in the meantime, just make a script that prints the environment to a file and exits. You can then see exactly what data you have to work with, including the variable that tells you whether it’s creating, deleting, or modifying a domain.