php - Codeigniter Remote Database Connection Issue -
a codeigniter project(in windows) required connect remote mysql database(in linux server). here database.php configuration.
$active_group = 'default'; $active_record = true; $db['default']['hostname'] = 'xxx.xxx.x.xxx'; $db['default']['username'] = 'username'; $db['default']['password'] = 'password'; $db['default']['database'] = 'database'; $db['default']['dbdriver'] = 'mysql'; $db['default']['dbprefix'] = ''; $db['default']['pconnect'] = true; $db['default']['db_debug'] = true; $db['default']['cache_on'] = false; $db['default']['cachedir'] = ''; $db['default']['char_set'] = 'utf8'; $db['default']['dbcollat'] = 'utf8_general_ci'; $db['default']['swap_pre'] = ''; $db['default']['autoinit'] = true; $db['default']['stricton'] = false;
and gives error
a database error occurred unable connect database server using provided settings. filename: *:\****\***\htdocs\project\system\database\db_driver.php line number: 124
but can access remote mysql database via phpmyadmin , heidisql using same username , password. (all privilages granted)
here remote database configuration
server version: 5.0.95 protocol version: 10 server: localhost via unix socket mysql charset: utf-8 unicode (utf8) mysql client version: 5.0.95 used php extensions: mysql
any appreciated
i faced same issue before couple of months ago when connecting remote mysql server in linux.
i tried in mysql via phpmyadmin
show variables 'old_passwords'
, says me on
it means old_passwords=1
in my.cnf
file in server mysql configuration.
solution problem updating password
corresponding user
reference : error: mysqlnd cannot connect mysql 4.1+ using old insecure authentication
Comments
Post a Comment