• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
codeigniter database connection to google cloud SQL

#1
  I am unable to connect the codeigniter application to google cloud SQL, i need some help step n it.. 

My code is : 


$db['default'] = array(
'dsn' => '',
'hostname' => ':/cloudsql/test-001:europe-west1:test-001-location-data',
'username' => 'root',
'password' => 'dev',
'database' => 'devapp_test',
'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
);
Reply

#2
Your hostname seems invalid.
Reply

#3
you need a google cloud sql proxy which is explained in detail on cloud.google.com

can you show us how you start the sql proxy? (the complete command)
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.