Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私のSQLホスト環境では、mysqlに接続しようとすると、sshホストを経由する必要があります。これが私の接続です:
ssh hostname: server01 username : user pwd: password mysqlhostname : mysql01 port : 3306 username : mysqluser pwd: mysqlpwd
PHPでデータベースに接続するにはどうすればよいですか?
できません。必要なことは、Web サーバーから SSH ホストへの SSH トンネルをセットアップし、PHP でトンネルのポートで localhost を使用することです。