Hello,
I am trying to connect my website to mysql database located on Mycloud. I loaded phpmyadmin on mycloud successfully and can access it with no issues. When setting up phpmyadmin on mycloud, it seems the hostname defaults to “localhost”. My website is hosted on godaddy. In my website config.php script, I use “localhost” as the hostname, and the respective user, password, and dbname to point to mysql on mycloud. For example, my config.php script looks like this:
$dbhost=‘localhost’;
$dbusername=‘xxxxxx’;
$dbuserpass=‘xxxxxx’;
$dbname = ‘databasename’;
$linkdb = mysql_connect ($dbhost, $dbusername, $dbuserpass);
mysql_select_db($dbname) or die(‘Cannot select database’);
Well, this does not work. All I get is the “Cannot select database” error. Has anyone successfully connected to their database on My Cloud via a config.php script? Is the issue with godaddy?
Thanks in advance