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 "", 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 ]
$link = mysql_connect('', 'username', 'mypassword');
if (!$link) {
die('Could not connect: ' . mysql_error());
echo 'Connected successfully';
  1. <?php
  2. $link = mysql_connect('', '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 "" 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.


Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 6 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-2017. Ozzu® is a registered trademark of Unmelted, LLC.