View Single Post
  #1  
Old 07-19-2008, 09:53 PM
Antonio878 Antonio878 is offline
Sergeant
 
Join Date: Sep 2007
Posts: 31
Question Help me with Error

I want to create a database from my site, and i have the php code for it.
PHP Code:
<?php$con mysql_connect("localhost","***","****");
if (!
$con)  {  die('Could not connect: ' mysql_error());
  }if (
mysql_query("CREATE DATABASE ***_officer",$con))
  {  
echo 
"Database created";
  }
else 
 {
  echo 
"Error creating database: " mysql_error();
  }
mysql_close($con);
?>
everytime i try and create the database by using this code, it always saysError creating database: Access denied for user '***'@'localhost' to database 'oieieais_officer'Account Id (server name) Voda22 can anyone help me, please?
Reply With Quote