Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    156
    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:
    151
    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice