Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

AK

share|improve this question

1 Answer 1

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

 
discard

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.