You got this error because your password, user, or host was wrong. I know your absolutely sure, but check one last time. Also, not many people code MySQL like above, but they code similar. Try:
Also, you should make sure you put an "@" sign in front of your mysql functions if you decide to code like that. The "@" symbol suppresses any errors or warnings.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
mysql_connect("sql307.000space.com","spa…", "") or die("Could not connect: ".mysql_error());
mysql_query("CREATE DATABASE my_db") or die("Error creating database: ".mysql_error());