For those of you who
don't have SSH access, can create their database by creating a file called
createdb.php. In this file place the following code:
Code:
<?php
$link = mysql_connect("localhost", "cpanelusername_mysqlusername", "cpanelusername_mysqlpassword") or die(mysql_error());
mysql_select_db("cpanelusername_mysqldatabase", $link) or die(mysql_error());
$query = mysql_query("CREATE TABLE 'user' ( 'name' VARCHAR (20), 'password' VARCHAR (20), 'ID' INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (ID))", $link) or die(mysql_error());
if ($query) echo "Table Created";
?>
Be sure to change
cpanel_username to the username that you open cPanel with,
mysqlusername to the user that you created for this database,
mysqlpassword with the password for that user, and
mysqldatabase with the name of the database that this user has access to. Run this script in your browser. If it gives you a message saying
Table Created the creation was successful. Once it is created,
DELETE THIS FILE IMMEDIATELY, by not deleting it, you are leaving a large security whole open.