3 Replies - 691 Views - Last Post: 09 August 2008 - 12:50 PM

#1 †Mash†  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 12
  • Joined: 09-August 08

Recieving error message -.-

Post icon  Posted 09 August 2008 - 01:14 AM

I am having lots of trouble getting a mysql database to work for me =/

I want to run this database on a subdomain to my website.
I have created a subdomain: Alphascout.clanxhhx.bliztek.com
The document root to this subdomain is: home/public_html/alpha scout
I have filled in all of the files to the database correctly.. - I think - but when I go to the website, I get this error:

Warning: mysql_connect() [function.mysql-connect]: Unknown MySQL server host 'alphascoutclanxhhxbliztekcom' (1) in /home/clanxhhx/public_html/AlphaScout/include/database.php on line 24
Unknown MySQL server host 'alphascoutclanxhhxbliztekcom' (1)

This is the code of where the error is happening:

  /* Class constructor */
   function MySQLDB(){
	  /* Make connection to database */
	   $this->connection = mysql_connect(alphascout.clanxhhx.bliztek.com, DB_user, DB_pass) or die(mysql_error());
	  mysql_select_db(alphascout.clanxhhx.bliztek.com, $this->connection) or die(mysql_error());


I dont understand.. its not connecting to the database.. could anyone help?

Is This A Good Question/Topic? 0
  • +

Replies To: Recieving error message -.-

#2 no2pencil  Icon User is offline

  • Toubabo Koomi
  • member icon

Reputation: 5230
  • View blog
  • Posts: 27,015
  • Joined: 10-May 07

Re: Recieving error message -.-

Posted 09 August 2008 - 01:20 AM

Before you start throwing commands into a PHP file, you need to 1st make sure that you can manually connect to the mysql daemon. Can you connect to it?
Was This Post Helpful? 0
  • +
  • -

#3 †Mash†  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 12
  • Joined: 09-August 08

Re: Recieving error message -.-

Posted 09 August 2008 - 01:33 AM

Um. Not really sure =/

im new to this.. a friend hooked me up with all the codes, I just had to load it onto my site, lol.
Was This Post Helpful? 0
  • +
  • -

#4 †Mash†  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 12
  • Joined: 09-August 08

Re: Recieving error message -.-

Posted 09 August 2008 - 12:50 PM

how do i try to connect to it?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1