Sql - can't connect [noob]

Hi everyone,

I’m following the tutorial [COLOR=sienna]“Login Using Flash MX, PHP, and MySQL”[/COLOR]
It’s giving me this error: [COLOR=sienna]“Unable to connect to SQL server”[/COLOR]

the error logs on the server are saying: [COLOR=sienna]"Unknown MySQL server host "[/COLOR]
so I must be typing something in wrong.

when I created the db, I named it, let’s say… “dbname”
however the CP displays the database name and username as “thingey_dbname”
it added text in front with an underscore. Naturally I’ve tried that as my database name and username, no sucess.

here is pretty much what I have for the part drawing the error:

mysql_connect("dbname.mywebsite.com","theusername","password")
or die("Unable to connect to SQL server");
mysql_select_db("dbname") or die("Unable to select database");

I’ve tried:

mysql_connect("thingey_dbname.mywebsite.com","thingey_theusername","password")
or die("Unable to connect to SQL server");
mysql_select_db("thingey_dbname") or die("Unable to select database");

also:

sql.mywebsite.com
mysql.mywebsite.com

anyone know what I’m doing wrong here?

-hroth