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:
<?php
$link = mysql_connect('mysql135.secureserver.net', 'username', 'mypassword');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>
- <?php
- $link = mysql_connect('mysql135.secureserver.net', 'username', 'mypassword');
- if (!$link) {
- die('Could not connect: ' . mysql_error());
- }
- echo 'Connected successfully';
- mysql_close($link);
- ?>
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.