Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Google Cloud SQL and Vanilla Forum Database Error

I'm having problems connecting to my Google Cloud DB.

In debug mode for Vanilla Forums i'm getting this error:

Lost connection to MySQL server at 'reading initial communication packet'

I have tried the following combinations for Vanilla configuration in file: /forum/conf/config.php

$google_IPv4 = '***.***.***.***'; // Google IPv4 address
$Configuration['Database']['Name'] = 'tpl_vanilla_forum';
$Configuration['Database']['Host'] = $google_IPv4;
$Configuration['Database']['User'] = "username"; // client host %
$Configuration['Database']['Password'] = '********';

AND

$google_IPv4 = '***.***.***.***'; // Google IPv4 address
$Configuration['Database']['Name'] = 'tpl_vanilla_forum';
$Configuration['Database']['Host'] = $google_IPv4;
$Configuration['Database']['User'] = "'username'@'%'"; // client host %
$Configuration['Database']['Password'] = '********';

Also in file: /forum/library/database/class.database.php

I played with the Connection() function and commented out the original line and still same error:

$this->_Connection = new pdo('mysql:host=***.***.***.***;port=3306;dbname=tpl_vanilla_forum', 'username', '******', $this->ConnectionOptions);
// $this->_Connection = new PDO(strtolower($this->Engine) . ':' . $this->Dsn, $this->User, $this->Password, $this->ConnectionOptions);

This doc explains connecting for Development using IPv4: https://cloud.google.com/appengine/docs/php/cloud-sql/#PHP_Connect_to_your_database

AND

This one explains Creating Users and Specifying Account Names: https://cloud.google.com/sql/docs/create-user

I have my server IP listed in Google Cloud SQL -> Access Control -> Authorization -> Allowed Networks. I assume if this was the issue the Database error thrown would read differently?

If you're familiar with Google Cloud SQL, any ideas? Thanks

Regards
-Hector

Comments

Sign In or Register to comment.