I think I have the wrong quotes here, I've tried a couple of different ways but still get errors. Can anyone help me out?
$sql = "GRANT USAGE ON db_" . $user . ".* TO '" . $user"'@'" . $dbhost . "' IDENTIFIED BY '" . $pass . "'";
Justin,
You have your quotes around the @ in the user@host
Try this:
$sql = "GRANT USAGE ON db_" . $user . ".* TO '" . $user."@" . $dbhost . "' IDENTIFIED BY '" . $pass . "'";