Ask a Question
Advertise on boostr.in
using ssh tunnel with zend does not work but it works with a mysql client
using ssh tunnel with zend does not work but it works with a mysql client ¬†using -'php,mysql,zend-framework,ssh,ssh-tunnel'
I have a server with a ssh conection on port 2899 to use a mysql server. I make a tunnel between my machine and the server in this way.
ssh -p 2899 [ssh_user]@[ssh_server] -L 3306:localhost:3306 -N
Then, I enter the password and it gives me the tunnel.
When I go to my mysql client (navicat in this case), I create this connection:
When I connect the tunnel works and I contact with the ssh server, and the schemas are shown and so on.
However when I use these params using Zend, I obtain the error "SQLSTATE[HY000] ".
¬†resources.db.adapter = "pdo_mysql"
¬†resources.db.params.host = "localhost"
¬†resources.db.params.username = "[local_user]"
¬†resources.db.params.password = "[local_user_pass]"
¬†resources.db.params.dbname = "[schema_name]"
¬†resources.db.params.charset = "utf8"
¬†resources.db.isDefaultTableAdapter = true
Why I can access with my mysql client but not with my Zend application?
Oct 19, 2015
to add a comment.
Your name to display (optional):
Email me at this address if my answer is selected or commented on:
Email me if my answer is selected or commented on
Privacy: Your email address will only be used for sending these notifications.
To avoid this verification in future, please