|
Helo guys,
I keep on getting the message :Can't create database ... Database exists.
I have root privilleges, and there is not definetely a database with the name I am trying to create.
Here is part of the code I am trying to run:
<?php
// Connect to MySQL, using the mysql_connect function.
mysql_connect ("localhost", "root", "") or die ("Could not connect to the database!");
// Create the database where the tables will be stored.
mysql_create_db ("MyMP3") or die (mysql_error ()) ;
// Select the database I want to work with.
mysql_select_db ("MyMP3") ;
// Create the mp3 table.
$mp3 = "CREATE TABLE mp3 (
mp3_id INT NOT NULL auto_increment ,
mp3_band VARCHAR ,
mp3_track VARCHAR ,
mp3_type TYNIINT ,
mp3_year INT ,
mp3_duration DEC ,
mp3_file_size DEC ,
mp3_comments VARCHAR ,
PRIMARY KEY (mp3_id) ,
$results = mysql_query ($mp3) or die (mysql_error ()) ;
echo "MyMP3 Database has been created successfully!" ;
?>
Can you tell me why I get this error.
Thank you very much.
|