[Zope] Ape & MySQL: Error adding ZODB MountPoint

Elena Schulz elena.schulz at gmx.net
Tue Apr 13 09:03:30 EDT 2004


Hi Shane and Jo,

thanks for the input about adding users to mysql. But still I cannot get ape
running with mysql getting the same error.
So my questions are:

1. Do I need to add a Z MySQL Database Connection in the root or somewhere
else or does ape add one by default?
2. If so what are the required parameters (id, user, password) if any? An
example would be fine.
3. What has to be setup in the zope.conf concerning the mysql database?
Something like: connect(db='ape' , user=?, password=?)

May be a small explicit example would clear any doubt.

With the setup below I can add a Z MySQL Database Connection with
connectionstring 'ape myuser mypassword' , connect to the db 'ape' and
querying a table 'test'.
I do see a sql link in Control Panel -> Database Management but get the
previous error when I click on that. The same happens if I try to add a ZODB
MountPoint.

-- any hint what to do next would be nice, Elena

Up to now I have the following setup in the mysql-db:

- db 'ape' created
- added record in mysql.user with all permissions set to 'Y'
    Host          User      Password
    localhost    %         <empty>

- added record in mysql.db with all permissions set to 'Y'
    Host          Db      User
    localhost    ape     %

- add sql-section to zope.conf:
# Sebi: added Ape-MySQL storage
<ape-db sql>
  <ape-storage>
    mapper-variation sql
    <ape-dbapi-connection db>
      connection-class apelib.sql.dbapi.MySQLConnection
      module-name MySQLdb
      connect-expression connect(db='ape')
    </ape-dbapi-connection>
  </ape-storage>
  mount-point /sql
</ape-db>




More information about the Zope mailing list