Hi guys,
One problem does not let me sleep.
I have to create and access new database from php script.
Everything works fine if this databse was created and
droped before. But if this is a completely new database
- I'm getting:
Error creating database: Access denied for user: 'user@64.46.100.64' to database 'new10'
I'm using this code,
<?php
$link = mysql_pconnect("host", "user", "pass")
or die("Could not connect: " . mysql_error());
if (mysql_create_db($db)) {
print ("Database created successfully\n");
} else {
printf ("Error creating database: %s\n", mysql_error());
}
?>
I tried using query "CREATE DATABASE new10" - same error.
If I create this database via control panel of my host - everything works fine, so connection should be right.
I think the problem is in user access table which are not updated.
Question: how can I make this work? How to update access table? Help!
Thank you