Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Very recently I have started to write python scripts that need to connect few databases on mySQL server. The problem is that when I work from office my script works fine but running a script from my home while on office VPN generates connection error.

I also noticed the mySQL client Squirrel also cannot connect from my home but works fine on Office computer. I think both are giving problem for the same reason.

Do I need to create a ssh tunnel and forward the port? If yes how do I do it? mySQL is installed on server I have ssh access.

Please help me on this


share|improve this question

2 things i can think of, 1 beeing that the port is not open for your home, another would be that the user on the server was created for your office computer (user@office)

you can test the first with nc -vz host port (default 3306) second would be to query the mysql.user table and se how your user is defined

mysql> select user,host from mysql.user;
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.