Help me with Error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Antonio878
    Master Sergeant

    • Sep 2007
    • 68

    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?
    Check out:
    Great Windmill (A Place Where You Can Have Fun!)

    You can do so much on the website, check it out!
  • navaldesign
    General & Forum Moderator

    • Oct 2005
    • 12080

    #2
    Re: Help me with Error

    In VH you can NOT create a database from script. You need to create the Database through your CP. After that you can create the necessary tables using a script.
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

    Comment

    Working...
    X