Welcome to Dream.In.Code
Getting Help is Easy!

Join 131,557 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,220 people online right now. Registration is fast and FREE... Join Now!




Recieving error message -.-

 
Reply to this topicStart new topic

Recieving error message -.-, ^^

†Mash†
post 9 Aug, 2008 - 12:14 AM
Post #1


New D.I.C Head

*
Joined: 8 Aug, 2008
Posts: 12

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:

CODE
  /* 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?
User is offlineProfile CardPM

Go to the top of the page


no2pencil
post 9 Aug, 2008 - 12:20 AM
Post #2


My fridge be runnin OH NOEZ!

Group Icon
Joined: 10 May, 2007
Posts: 6,288



Thanked 54 times

Dream Kudos: 2375

Expert In: Goofing Off

My Contributions


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?
User is online!Profile CardPM

Go to the top of the page

†Mash†
post 9 Aug, 2008 - 12:33 AM
Post #3


New D.I.C Head

*
Joined: 8 Aug, 2008
Posts: 12

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.
User is offlineProfile CardPM

Go to the top of the page

†Mash†
post 9 Aug, 2008 - 11:50 AM
Post #4


New D.I.C Head

*
Joined: 8 Aug, 2008
Posts: 12

how do i try to connect to it?
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/20/08 02:50AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month