database - Can't connect to MySQL databse of any webhost from anywhere other than the webhost itself -


i have 2 different webhost (pagodabox & 000webhost, both free) , i've set localhost mysql.

i've installed wordpress on 3 of them work fine within own domain -- ie. when localhost wordpress using localhost database, pagodabox using pagodabox database , on.

however if change database access credentials wp-config.php in order to, say, make localhost wordpress connect 000webhost database, doesn't work: "error establishing database".

here's respective credentials use:

<?php  wp-config.php - relevant differences  * members.000webhost.com/panel/manage mysql databases         // ** mysql settings - can info web host ** //         /** name of database wordpress */         define('db_name', '--------_db');         /** mysql database username */         define('db_user', '--------');         /** mysql database password */         define('db_password', '--------');         /** mysql hostname */         define('db_host', 'mysq--.000webhost.com');      * tunnel.pagodabox.com     // ** mysql settings - can info web host ** //         /** name of database wordpress */         define('db_name', '--------_db');         /** mysql database username */         define('db_user', '--------');         /** mysql database password */         define('db_password', '--------');         /** mysql hostname */         define('db_host', 'tunnel.pagodabox.com');      * localhost         // ** mysql settings - can info web host ** //         /** name of database wordpress */         define('db_name', '--------_db');         /** mysql database username */         define('db_user', '--------');         /** mysql database password */         define('db_password', '--------');         /** mysql hostname */         define('db_host', 'localhost');      ?> 

if have cpanel, , "remote mysql" enabled in cpanel, then..

you can allow external web servers access mysql databases adding domain name list of hosts able access databases on web site.

remote mysql in cpanel

however guess trying connect 000webhost local computer. don't think can because cpanel won't consider valid host.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -