I'm new to Zope and got it running fine with Apache. I've experimented with it and read quite a few "How-Tos". I've walked through some of the How-Tos and setup various documents and objects. But...I have yet to find any information on how to get Zope to select and insert data to a MySQL database. I've downloaded and attempted to install MySQLdb from www.zope.org The build worked fine but there are no docs on how to use it or I don't know how to look at the docs if it is embedded in Python code. (I'm new to python too) Is there something more I need to do to get Zope to see a MySQL database? Where is the how-to for this? Thanks, Jose de Leon
On Fri, Oct 29, 1999 at 02:02:19PM -0700, Jose de Leon wrote:
But...I have yet to find any information on how to get Zope to select and insert data to a MySQL database. I've downloaded and attempted to install MySQLdb from www.zope.org
MySQLdb is only a Python MySQL module, to access MySQL databases from Zope you need (also) the ZMySQLDA product. Strange coincidence: Just in this moment, I was about to write a mail to the list and ask why ZMySQLDA is no longer available on zope.org. IIRC, it used to be on the old site. Gregor
Gregor, IIRC ZMySQLda is no longer 'supported' as it is not thread safe, that said I use it in a multi thread environment and it seems OK for simple selections. HTH phil phil@wigwamweb.net
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of flight@mathi.uni-heidelberg.de Sent: 29 October 1999 22:11 To: Jose de Leon Cc: zope@zope.org Subject: Re: [Zope] MySQL and Zope
On Fri, Oct 29, 1999 at 02:02:19PM -0700, Jose de Leon wrote:
But...I have yet to find any information on how to get Zope to select and insert data to a MySQL database. I've downloaded and attempted to install MySQLdb from www.zope.org
MySQLdb is only a Python MySQL module, to access MySQL databases from Zope you need (also) the ZMySQLDA product.
Strange coincidence: Just in this moment, I was about to write a mail to the list and ask why ZMySQLDA is no longer available on zope.org. IIRC, it used to be on the old site.
Gregor
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(Related lists - please, no cross posts or HTML encoding!
To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce
For developer-specific issues, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
Does this mean I can't use MySQL with Zope? Is there an alternative database connector to MySQL? I'm intending to create a rather large site with heavy dependence on MySQL. I haven't yet looked at the source for ZMySQLda, (mainly because I can't find it either), but if I have to modify it to make it thread-safe I will. I just need some help setting up at least simple connection to MySQL database so I can have something to work with. ----- Original Message ----- From: Phil Harris <phil@wigwamweb.net> To: <flight@mathi.uni-heidelberg.de>; Jose de Leon <jadiel@thevision.net> Cc: <zope@zope.org> Sent: Friday, October 29, 1999 2:44 PM Subject: RE: [Zope] MySQL and Zope Gregor, IIRC ZMySQLda is no longer 'supported' as it is not thread safe, that said I use it in a multi thread environment and it seems OK for simple selections. HTH phil phil@wigwamweb.net
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of flight@mathi.uni-heidelberg.de Sent: 29 October 1999 22:11 To: Jose de Leon Cc: zope@zope.org Subject: Re: [Zope] MySQL and Zope
On Fri, Oct 29, 1999 at 02:02:19PM -0700, Jose de Leon wrote:
But...I have yet to find any information on how to get Zope to select and insert data to a MySQL database. I've downloaded and attempted to install MySQLdb from www.zope.org
MySQLdb is only a Python MySQL module, to access MySQL databases from Zope you need (also) the ZMySQLDA product.
Strange coincidence: Just in this moment, I was about to write a mail to the list and ask why ZMySQLDA is no longer available on zope.org. IIRC, it used to be on the old site.
Gregor
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(Related lists - please, no cross posts or HTML encoding!
To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce
For developer-specific issues, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope (Related lists - please, no cross posts or HTML encoding! To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce For developer-specific issues, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
Under the interface to MySQL section of the products on zope.org at http://www.zope.org/Members/adustman/MySQLdb it reads : A patch is included which will update ZMySQLDA (which uses an older, non-thread-safe MySQL interface) to use _mysql. It is expected that DC will eventually incorporate this patch once it is fully tested. So i think this will patch up ZMySQLDA, to be all nice and thread safe, but i haven't used it, so I can't be sure scott kaplan scott@drsource.com skaplan@wso.williams.edu On Fri, 29 Oct 1999, Jose de Leon wrote:
Does this mean I can't use MySQL with Zope? Is there an alternative database connector to MySQL? I'm intending to create a rather large site with heavy dependence on MySQL.
I haven't yet looked at the source for ZMySQLda, (mainly because I can't find it either), but if I have to modify it to make it thread-safe I will. I just need some help setting up at least simple connection to MySQL database so I can have something to work with.
----- Original Message ----- From: Phil Harris <phil@wigwamweb.net> To: <flight@mathi.uni-heidelberg.de>; Jose de Leon <jadiel@thevision.net> Cc: <zope@zope.org> Sent: Friday, October 29, 1999 2:44 PM Subject: RE: [Zope] MySQL and Zope
Gregor,
IIRC ZMySQLda is no longer 'supported' as it is not thread safe, that said I use it in a multi thread environment and it seems OK for simple selections.
HTH
phil phil@wigwamweb.net
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of flight@mathi.uni-heidelberg.de Sent: 29 October 1999 22:11 To: Jose de Leon Cc: zope@zope.org Subject: Re: [Zope] MySQL and Zope
On Fri, Oct 29, 1999 at 02:02:19PM -0700, Jose de Leon wrote:
But...I have yet to find any information on how to get Zope to select and insert data to a MySQL database. I've downloaded and attempted to install MySQLdb from www.zope.org
MySQLdb is only a Python MySQL module, to access MySQL databases from Zope you need (also) the ZMySQLDA product.
Strange coincidence: Just in this moment, I was about to write a mail to the list and ask why ZMySQLDA is no longer available on zope.org. IIRC, it used to be on the old site.
Gregor
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(Related lists - please, no cross posts or HTML encoding!
To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce
For developer-specific issues, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(Related lists - please, no cross posts or HTML encoding!
To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce
For developer-specific issues, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(Related lists - please, no cross posts or HTML encoding!
To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce
For developer-specific issues, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
On 10/29/99 4:44 PM, Phil Harris at phil@wigwamweb.net wrote:
Gregor,
IIRC ZMySQLda is no longer 'supported' as it is not thread safe, that said I use it in a multi thread environment and it seems OK for simple selections.
Actually, it has less to do with threading (which we could have fixed) and more to do with the total lack of transactional symantics in MySQL. This is a huge flaw from our perspective, though other people may be willing to accept the risks. Additionally, we have no customers using it, so no resources dedicated to keeping it up. We've been looking for someone in the community to take it over and champion it. Chris -- | Christopher Petrilli Python Powered Digital Creations, Inc. | petrilli@digicool.com http://www.digicool.com
How can I contribute to ZMySQLda? I am currently a Senior Programmer Analyst, and I have some free time... I use MySQL almost exclusively and now that I have found Zope, a fantastic tool!, I just want to code with Zope and MySQL together. I'm currently not happy with existing Python-MySQL interface, so I'm on a mission to design my own for two reasons: 1) Understand Python better (I'm new to Python due to Zope, I wish I had found Python before Perl), 2) Make a better interface. BTW, The MySQL developers will be adding transaction support. It would be nice to be ready for that than to have to catch up. If you look at their current TODO list, Transactions is #2 on the "Near Future" In general, their near futures have been quite near. :-) Sincerely, Jose de Leon ----- Original Message ----- From: Christopher Petrilli <petrilli@digicool.com> To: Phil Harris <phil@wigwamweb.net>; <flight@mathi.uni-heidelberg.de>; Jose de Leon <jadiel@thevision.net> Cc: <zope@zope.org> Sent: Sunday, October 31, 1999 7:18 AM Subject: Re: [Zope] MySQL and Zope On 10/29/99 4:44 PM, Phil Harris at phil@wigwamweb.net wrote:
Gregor,
IIRC ZMySQLda is no longer 'supported' as it is not thread safe, that said I use it in a multi thread environment and it seems OK for simple selections.
Actually, it has less to do with threading (which we could have fixed) and more to do with the total lack of transactional symantics in MySQL. This is a huge flaw from our perspective, though other people may be willing to accept the risks. Additionally, we have no customers using it, so no resources dedicated to keeping it up. We've been looking for someone in the community to take it over and champion it. Chris -- | Christopher Petrilli Python Powered Digital Creations, Inc. | petrilli@digicool.com http://www.digicool.com
BTW, The MySQL developers will be adding transaction support. It would be nice to be ready for that than to have to catch up. If you look at their current TODO list, Transactions is #2 on the "Near Future" In general, their near futures have been quite near. :-)
If you scroll down a bit on that page, it says; " F.3 Some things we don't have any plans to do Transactions with rollback (we mainly do SELECTs, and because we don't do transactions, we can be much quicker on everything else). We will support some kind of atomic operations on multiple tables, though. Currently atomic operations can be done with LOCK TABLES/UNLOCK TABLES but we will make this more automatic in the future. " So I really dont know what they mean...? /Magnus Heino
I asked on MySQL list about the same thing, I noticed it too. Somebody from MySQL replied and noted that part at the end is a mistake and that transactions will in fact be supported soon. Some transactions possibly be supported this year but he couldn't make any promises. ----- Original Message ----- From: Magnus Heino <magnus@vuab.net> To: Jose de Leon <jadiel@thevision.net> Cc: <zope@zope.org> Sent: Monday, November 01, 1999 11:57 PM Subject: Re: [Zope] MySQL and Zope
BTW, The MySQL developers will be adding transaction support. It would be nice to be ready for that than to have to catch up. If you look at their current TODO list, Transactions is #2 on the "Near Future" In general, their near futures have been quite near. :-)
If you scroll down a bit on that page, it says; " F.3 Some things we don't have any plans to do Transactions with rollback (we mainly do SELECTs, and because we don't do transactions, we can be much quicker on everything else). We will support some kind of atomic operations on multiple tables, though. Currently atomic operations can be done with LOCK TABLES/UNLOCK TABLES but we will make this more automatic in the future. " So I really dont know what they mean...? /Magnus Heino _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope (Related lists - please, no cross posts or HTML encoding! To receive general Zope announcements, see: http://lists.zope.org/mailman/listinfo/zope-announce For developer-specific issues, zope-dev@zope.org - http://lists.zope.org/mailman/listinfo/zope-dev )
On 11/2/99 11:45 AM, Jose de Leon at jadiel@thevision.net wrote:
I asked on MySQL list about the same thing, I noticed it too. Somebody from MySQL replied and noted that part at the end is a mistake and that transactions will in fact be supported soon. Some transactions possibly be supported this year but he couldn't make any promises.
Once this is done, it will be easier to make the impedance match between Zope and MySQL. Whether it becomes a "supported" DA is a totally separate question that will have more marketing/pr/management decisions in it. I look forward to MySQL joining the wold that does need transactions. It will be interesting to see the performance impact, however. Chris -- | Christopher Petrilli Python Powered Digital Creations, Inc. | petrilli@digicool.com http://www.digicool.com
If MySQL gets transactional support, will we be able to co-ordinate its transactions with those of Zope? Picture a method in a Zope class which updates a MySQL row and touches some Zope objects. Zope will roll back the entire lot if one of the operations on those objects fails, but as I understand it Zope doesn't provide any hooks [yet] to tell MySQL to roll back the transaction performed on it. Regards, Garth. -- <gtk@well.com>
gtk wrote:
If MySQL gets transactional support, will we be able to co-ordinate its transactions with those of Zope?
Is there any hope of it happening ?
Picture a method in a Zope class which updates a MySQL row and touches some Zope objects. Zope will roll back the entire lot if one of the operations on those objects fails, but as I understand it Zope doesn't provide any hooks [yet] to tell MySQL to roll back the transaction performed on it.
AFAIK it does if for all real RDBMs (Oracle, PostgreSQL,...), it is part of the DA and thus should be transparent to developers/users. --------------- Hannu
On 11/2/99 6:08 PM, gtk at gtk@well.com wrote:
If MySQL gets transactional support, will we be able to co-ordinate its transactions with those of Zope?
Picture a method in a Zope class which updates a MySQL row and touches some Zope objects. Zope will roll back the entire lot if one of the operations on those objects fails, but as I understand it Zope doesn't provide any hooks [yet] to tell MySQL to roll back the transaction performed on it.
Uh, with all "real" databases, we syncronize all transaction boundaries and this is done totally automatically underneath. You don't have to worry about this when writing applications. The reason Zope doesn't provide any "hooks" as you say is that MySQL has no transactions, period, end of story. tpc_begin, tpc_commit, tpc_abort are all null ops because of that. It's just something that has to be fleshed out in the DA for the database.... Zope has been doing this for YEARS. Chris -- | Christopher Petrilli Python Powered Digital Creations, Inc. | petrilli@digicool.com http://www.digicool.com
participants (8)
-
Christopher Petrilli -
flight@mathi.uni-heidelberg.de -
gtk -
Hannu Krosing -
Jose de Leon -
Magnus Heino -
Phil Harris -
scott kaplan