Before you start running mysql commands, you need to connect to the database.
you have specified a host, username and password, but have not selected a database.
this code will connect you up, then you can run your mysql commands:
$dbhost = 'localhost';
$dbuser = 'username';
$dbpass = 'password';
mysql_connect($dbhost, $dbuser, $dbpass);
$dbname = 'dbname';
mysql_select_db ($dbname);
// MySQL commands go here.
dbhost, which is localhost works on most servers, just change username, password and dbname.
hope this helps 🙂