0
votes

I've looked at all the other questions and don't see one that answers my question, although many are similar. I'm working through the book Web Application Development with Yii and PHP.

  1. I have a PHP app, that I developed previously that works with this connectionstring: $con = mysql_connect("10.6.186.140", "smucmap", "*") or die("Could not Connect to MySQL server!");

  2. I have an app that works on localhost using XAMPP and the provided examples, using the Yii Framework, it works: 'db'=>array( 'connectionString' => 'mysql:host=127.0.0.1;port=3306,dbname=cmi', 'emulatePrepare' => true, 'username' => 'root', 'password' => '', 'charset' => 'utf8', ),

  3. But, when I try to change the host, username and password to make the connection to my external database, I get the error. This Mysql database is on a Linux based host on GoDaddy, and PDO is enabled in PHP.ini Everything seems correct, but I've spent days trying to move, for example my trackstar app from local host to an external site, to make sure I can use it there, but no luck.

Any suggestion would be appreciated.

1
A full and exact error message worth more than any 100 words of your long and windy description.Your Common Sense

1 Answers

0
votes

To connect remotely to a database, you must create a database and enable direct database access. If a database was created without this option selected, you will not be able to connect remotely. Direct Database Access is not available on free ad-supported hosting accounts.