php - mysqli::real_connect(): (HY000/2002): Connection refused on Live -
i create web site using php, mysql, , codeignater version 3. host on ipage. when upload on live make changes in config file.
$db['default'] = array( 'dsn' => '', 'hostname' => '66.96.147.118', 'username' => 'bit_root', 'password' => 'root', 'database' => 'bit_shilp', 'dbdriver' => 'mysqli', 'dbprefix' => '', 'pconnect' => false, 'db_debug' => (environment !== 'production'), 'cache_on' => false, 'cachedir' => '', 'char_set' => 'utf8', 'dbcollat' => 'utf8_general_ci', 'swap_pre' => '', 'encrypt' => false, 'compress' => false, 'stricton' => false, 'failover' => array(), 'save_queries' => true );
i use codeignater version 3. on local work great. on live site gives error.
please see link http://bitshilp.com/bitshilp/index.php/home
it gives error this:
a php error encountered
severity: warning
message: mysqli::real_connect(): (hy000/2002): connection refused
filename: mysqli/mysqli_driver.php
line number: 161
backtrace:
file: /hermes/bosnaweb13a/b2582/ipg.bitshilpcom/bitshilp/application/controllers/home.php line: 7 function: __construct
file: /hermes/bosnaweb13a/b2582/ipg.bitshilpcom/bitshilp/index.php line: 292 function: require_once php error encountered
severity: warning
message: cannot modify header information - headers sent (output started @ /hermes/bosnaweb13a/b2582/ipg.bitshilpcom/bitshilp/system/core/exceptions.php:272)
filename: core/common.php
line number: 568
backtrace:
file: /hermes/bosnaweb13a/b2582/ipg.bitshilpcom/bitshilp/application/controllers/home.php line: 7 function: __construct
file: /hermes/bosnaweb13a/b2582/ipg.bitshilpcom/bitshilp/index.php line: 292 function: require_once
thanks.
if mysql server , running - looks transport (e.g. firewall) problem. first step try telnet command below - if shows error, problem not related php or mysql :
telnet 66.96.147.118 3306
(on success print mysql version + random characters)
Comments
Post a Comment