I was able to use the hook script: without a problem.
In my script I create and populate a couple of databases (via php) with:
PHP Code:
shell_exec('mysql < /path/to/mydbs.sql');
However, I need to access the on localhost to set premissions so the databases will be available for new user. I cannot use
PHP Code:
mysql_connect('localhost','root','pass');
The connection fails. I cannot see how to do this via PHP. I am looking at Bash right now. Just rather have it all working in one language.
NOTE:
I dont like having my root password in a file like this anyway. So a better solution would be great.