user497721
user497721

Reputation: 21

PHP MySQL problem

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?

Upvotes: 2

Views: 152

Answers (3)

Caner
Caner

Reputation: 59168

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

Upvotes: 7

Vic
Vic

Reputation: 1346

Things that can cause this:

  1. You are using the wrong hostname for the mysql server.

Upvotes: 1

Jonah
Jonah

Reputation: 10091

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

Upvotes: 0

Related Questions