php - When testing external Mysql connection, I get the CDbConnection failed to open the DB connection -


i've looked @ other questions , don't see 1 answers question, although many similar. i'm working through book web application development yii , php.

  1. i have php app, developed works connectionstring: $con = mysql_connect("10.6.186.140", "smucmap", "*") or die("could not connect mysql server!");

  2. i have app works on localhost using xampp , provided examples, using yii framework, works: 'db'=>array( 'connectionstring' => 'mysql:host=127.0.0.1;port=3306,dbname=cmi', 'emulateprepare' => true, 'username' => 'root', 'password' => '', 'charset' => 'utf8', ),

  3. but, when try change host, username , password make connection external database, error. mysql database on linux based host on godaddy, , pdo enabled in php.ini seems correct, i've spent days trying move, example trackstar app local host external site, make sure can use there, no luck.

any suggestion appreciated.

to connect remotely database, must create database , enable direct database access. if database created without option selected, not able connect remotely. direct database access not available on free ad-supported hosting accounts.


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -