Google Cloud SQL connection - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9) +--- Thread: Google Cloud SQL connection (/showthread.php?tid=63918) |
Google Cloud SQL connection - mr_pablo - 12-22-2015 I have just moved form CI2 to CI3 and I am having trouble getting a DB connection to my Google Cloud SQL DB. In CI2, I used: PHP Code: $db['default']['hostname'] = 'localhost'; And I had to modify the MySQLi Driver: PHP Code: function db_connect() But now in CI3, the DB config does not work. I changed the hostname to be what the socket is set to, but it doesn't seem to have helped. Any ideas? EDIT - Never mind, I was being stupid. I hadn't set my development environment session variables properly. RE: Google Cloud SQL connection - nilanjanr0y - 07-19-2018 I am also facing this issue. Not sure what to do. It appears I am not being able to use the socket parameter even if I add it to the config array in the database.php. I have tried mysqli_connect in a test php file. The connection has no issues, it's completely a CI issue. The error I am getting is this: PHP Code: real_connect(): (HY000/2002): Unable to find the socket transport "unix" - did you forget to enable it when you configured PHP? |