Has anyone gotten mysql port forwarding to work with a drupal stack? I seem to be missing something.
I am trying to use ssh port forwarding to send my requests from localhost:3307 to a remote mysql server on localhost:3306. I can get port forwarding to work on my command line by:
ssh -v -N -L 3307:localhost:3306 bitnami@XXX.XX.XXXX (ip address)
I know this works because once I do this I can connect on the commandline by:
mysql -uroot -p -h 127.0.0.1 -P 3307
That works fine. However when I try to use port 3307 from Drupal, PDO seems to just use the standard port 3306.
sites/default/settings.php file for the database port. i.e.
$databases['default']['default'] = array(
'database' => 'bitnami_drupal8',
'username' => 'bn_drupal',
'password' => 'blahblah',
'prefix' => '',
'host' => 'localhost',
'port' => '3309',
//'unix_socket' => '/Applications/drupal-8.0.0-1/mysql/tmp/mysql.sock',
'namespace' => 'Drupal\Core\Database\Driver\mysql',
'driver' => 'mysql',