That's strange. I have the same connection-string, but for me it isn't
working after that.

In the original script I initially connect to another database,
transform the data and then create a new session to insert it in
another database. I close the 1th session before creating another.

>
> I'm developing a little pylons application and I'm using a mysql
> database. Like you, I'm using a ssh tunnel with port forwarding. My
> connection is working ok with SqlAlchemy.
>
> This is my connection string (I would start looking from there):
> sqlalchemy.url =
> mysql://user:[email protected]:63333/database
>
> As you can see I'm using port 63333 instead of 3307 as you mentioned.
>
> Mariano
>
> > On Mar 25, 5:24 pm, Richard de Koning <[email protected]> wrote:
> > > I'm pretty new using sqlalchemy and I will probably ask some smart and
> > > a lot of silly questions.
>
> > > At the moment I'm having problems with connecting to remote MySQL
> > > databases. If I run the updates on a local database everything works
> > > fine.
>
> > > When I try to connect to a remote database I keep getting the
> > > following errors:
>
> > >   File "/usr/lib/pymodules/python2.6/sqlalchemy/pool.py", line 142, in
> > > connect
> > >     return _ConnectionFairy(self).checkout()
> > >   File "/usr/lib/pymodules/python2.6/sqlalchemy/pool.py", line 304, in
> > > __init__
> > >     rec = self._connection_record = pool.get()
> > >   File "/usr/lib/pymodules/python2.6/sqlalchemy/pool.py", line 161, in
> > > get
> > >     return self.do_get()
> > >   File "/usr/lib/pymodules/python2.6/sqlalchemy/pool.py", line 639, in
> > > do_get
> > >     con = self.create_connection()
> > >   File "/usr/lib/pymodules/python2.6/sqlalchemy/pool.py", line 122, in
> > > create_connection
> > >     return _ConnectionRecord(self)
> > >   File "/usr/lib/pymodules/python2.6/sqlalchemy/pool.py", line 198, in
> > > __init__
> > >     self.connection = self.__connect()
> > >   File "/usr/lib/pymodules/python2.6/sqlalchemy/pool.py", line 261, in
> > > __connect
> > >     connection = self.__pool._creator()
> > >   File "/usr/lib/pymodules/python2.6/sqlalchemy/engine/strategies.py",
> > > line 80, in connect
> > >     raise exc.DBAPIError.instance(None, None, e)
> > > OperationalError: (OperationalError) (2003, "Can't connect to MySQL
> > > server on 'xxx.xxx.xxx.xxx' (111)") None None
>
> > > I checked the userrights. Tried with root and installed sqlalchemy and
> > > python-bindings for mysql on the server. I also tried on several
> > > servers with different OS-versions, but I can't see anything wrong.
> > > Manual logins with mysql-client to the servers work.
>
> > > Can anybody give any pointers how to solve this?

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to