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:
PHP Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-…
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>mysql test</title>
</head>
<body>
<?php
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());
?>
</body>
</html>
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.
Bookmarks