Organizational Research By

Surprising Reserch Topic

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:

server: localhost
port: 3306
user: [local_user]
pass: [local_user_pass]


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] [1044]".

 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?
    
asked Oct 19, 2015 by 20shahi
0 votes
23 views



Related Hot Questions



Government Jobs Opening


...