I'm trying to auto create a database/user and grant privelges for a specific domain that was created within Plesk.
The trouble I'm having is I want the database to still be available if you access that user via Plesk control panel.
Here's what I have:
$con = mysql_connect("127.0.0.1","root","pass");
mysql_query("CREATE DATABASE ".$db."",$con)or die(mysql_error());
mysql_query("GRANT ALL ON ".$db.".* to ".$user." identified by '".$dbpass."'",$con) or die(mysql_error());
This will work, but it won't show up in Plesk for the domain I'd like it to. How do I tie this database to a specific domain within plesk?
Thank you!