Hi Michael
Sorry about that - it had been a long day and I didn't realise I was quoting
code from the connector! I'll get onto them and see if they can help.
Cheers
Warwick
Warwick Prince
Managing Director
mobile: +61 411 026 992
skype: warwickprince
phone: +61 7 3102 3730
fax: +61 7 3319 6734
web: www.mushroomsys.com
On 27/08/2010, at 11:40 PM, Michael Bayer wrote:
>
> On Aug 27, 2010, at 4:39 AM, Warwick Prince wrote:
>
>> Hi Michael
>>
>> OK, I've invested (wasted?) my entire day on this connection issue and have
>> the following to report. Hopefully, the hints I've managed to find may
>> trigger something with you that will point me in the right direction.
>>
>> In recap; the issue was I could not get a simple engine to connect to the
>> MySQL database. This used to work on this server with the current
>> configuration and simply seemed to stop working.
>>
>> e = create_engine('mysql+mysqlconnector://user:[email protected]/testdb',
>> encoding='utf8', echo=False)
>> e.connect()
>>
>> (Traceback below from previous messages)
>>
>> So, I followed all the code through and found that it actually failing at
>> the point where in cursor.py it's attempting to create a new cursor.
>>
>> def set_connection(self, db):
>> try:
>> if isinstance(db.conn.protocol,protocol.MySQLProtocol):
>> self.db = weakref.ref(db)
>> if self not in self.db().cursors:
>> self.db().cursors.append(self)
>> except Exception as message:
>> raise errors.InterfaceError(errno=2048)
>>
>> The db appears to be correct (I looked), protocol.MySQLProtocol appears to
>> be correct BUT db.conn = None ! Therefore it raises 2048
>>
>> So, after many hours I can not find where db.conn is set or what it is
>> supposed to be in the first place! Note: I have a virtually identical
>> setup on my XP VM, and the same example of engine.connect() works fine.
>>
>> What I'm looking for is a little info on what db.conn should be, where is it
>> set, how can it be NOT set etc. Your help would be most appreciated.
>>
>> Incidentally, all was not a waste of time as I traversed nearly ALL of the
>> SA code today and picked up a few nice tips.. Thanks! :-)
>
> Well, that above is not part of SQLAlchemy. I would assume, since its
> called cursor.py and is dealing with MySQL internals, that its part of MySQL
> connector, so you should email on their list (and also you can test things
> without SQLAlchemy at all, just use a script with MySQL connector directly).
>
>
> --
> 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.
--
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.