2

Whenever I try to run a php script on my website hosted by hostgator, I get this error:

Warning: mysql_connect() [function.mysql-connect]: Unknown MySQL server host 'pieboy13_(user name)' (1) in /home/pieboy13/public_html/quigley/WebContent/Scripts/register.php on line 6 Error: Could not connect to server. Error Unknown MySQL server host 'pieboy13_(user name)' (1)

Where (Username) is my username.

What could cause this?

user497721
  • 21
  • 2

3 Answers3

7

You are triying to connect to your username! Check your configuration for server url and make sure it points to your mysql server.

Caner
  • 57,267
  • 35
  • 174
  • 180
  • Yay! You guys really helped! Me and one of my somewhat beginners friends had been stumped over that for about half an hour! Gotta read those docs better, I guess... – user497721 Dec 09 '10 at 02:30
1

Things that can cause this:

  1. You are using the wrong hostname for the mysql server.
Vic
  • 1,336
  • 11
  • 30
0

Looks like you might have put your database or username into the server argument.

Jonah
  • 9,991
  • 5
  • 45
  • 79