problems connecting to database on vdedicated server (php)

  • steven420
  • Graduate
  • Graduate
  • steven420
  • Posts: 100

Post 3+ Months Ago

Hi, I have posted the question in the codeing area with no response so I will try it here. I have been having problems connecting to a database on a godaddy vd server (domain is hosted on that server). I have tried all thier suggestions with no success. They told me to use my database name as the domain server, then tha database username, there help center says to use "mysql135.secureserver.net", everywhere else says to use "localhost". None of these worked. The databse was created on my domain and the password and username are correct. I'm not sure what to use as the mysql server host.
This is the script:
Code: [ Select ]
<?php
$link = mysql_connect('mysql135.secureserver.net', 'username', 'mypassword');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>
  1. <?php
  2. $link = mysql_connect('mysql135.secureserver.net', 'username', 'mypassword');
  3. if (!$link) {
  4. die('Could not connect: ' . mysql_error());
  5. }
  6. echo 'Connected successfully';
  7. mysql_close($link);
  8. ?>

Is there a special format like "mysql.databasename@domainhost.com" or something?

Where would I find the server host name?

I'm sorry for such a stupid question, I've looked everywhere for the answer with no luck. Please, please help me.

Thanks,
Steven.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 10 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.