Wednesday, October 17, 2018

[google-cloud-sql-discuss] Database connection Error

Hi,

I am new to google cloud server.

I am getting database error in my codeigniter frame work (PHP) application.

Database: Mysqli
Application version: PHP 5.5

Error Message: Unable to connnect your database by provided settings.

My sample database config code:

$db['default'] = array(
'dsn' => "'',
'hostname' => ' cloudsql/INSTANCE_CONNECTION_NAME;dbname=DATABASE ',
'username' => 'db user',
'password' => "db Password'',
'database' => 'db name',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => TRUE,
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '{PRE}',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);

Please help me on this.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/9f3000db-2b11-471b-8027-8d70a6ff35b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment