The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

mySQL-front creating a new database remotely

Discussion in 'General Discussion' started by Voltio, Feb 1, 2006.

  1. Voltio

    Voltio Active Member

    Joined:
    Oct 17, 2004
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    Im using mysql-front to connect remotely to mysql server, I had problems connecting but I found the solution in the forums. Now I want to create a New Database using mysql-front but its giving me errors, access denied. To create new databases do I have to do it using CPANEL ONLY?
     
  2. rminchrist

    rminchrist Member

    Joined:
    Dec 13, 2004
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Nairobi - Kenya
    U can use php to create a database

    <?php
    $link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
    if (!$link) {
    die('Could not connect: ' . mysql_error());
    }

    if (mysql_create_db('my_db')) {
    echo "Database created successfully\n";
    } else {
    echo 'Error creating database: ' . mysql_error() . "\n";
    }
    ?>
     
Loading...

Share This Page