Codeigniter Remote Database Connection Issue
I faced the same issue before a couple of months ago when connecting to the remote mysql server in linux.
I tried this in mysql via PHPMYADMIN
SHOW VARIABLES LIKE 'old_passwords'
and it says me ON
it means that old_passwords=1
in my.cnf
file in the server mysql configuration.
Solution for this problem is by updating the password
for the corresponding user
Reference : Error: mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication
Not sure if this would help, but I did encounter similar issue before.
$db['default']['dbdriver'] = 'mysqli';
instead of
$db['default']['dbdriver'] = 'mysql';
See if this works
Create a user with all privilages, Remember to set host to %
Edit mysqld.cnf and set "bind-address = 0.0.0.0" (may be /etc/mysql/mysql.conf.d/mysqld.cnf)
Restart mysql