Created
April 10, 2020 02:03
-
-
Save fcaldarelli/4b059fb30b48eb1d679ff68ec875bddd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From Docker container | |
ssh -nNT -L /var/run/mysqld/mysqld.sock:remotehost:3306 -i <cert.pem> ubuntu@ssh_host | |
# From Docker container, php config | |
$db = new PDO( sprintf("mysql:unix_socket=/var/run/mysqld/mysqld.sock;dbname=%s", $config['db']['database']), $config['db']['username'], $config['db']['password']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment