Saturday, August 7, 2021

Connect to mysql through ssh tunnel from php

 

Connect to mysql through ssh tunnel from php

 

shell_exec("ssh -fNg -L 3307:$dbServerHost:3306 user@remote_host");
$conection = new mysqli($dbServerHost, $username, $password, $dbname, 3307);

 

No comments:

Kubernetes in one shotcat

root@srv509172:~# cat kind1/config.yaml   kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane   image: kindest/nod...