plague-server && mysql

Jeff Sheltren sheltren at cs.ucsb.edu
Fri Oct 21 16:29:23 UTC 2005


On Oct 21, 2005, at 9:30 AM, Chris Weyl wrote:

> Hey all--
>
> I can't post a patch for various reasons beyond my control (sigh...),
> but updating plague to use a mysql backend was trivial.  (Not that I
> don't like postgresql -- mysql is just easier for me in this
> environment.)
>
> 1) yum install MySQL-python
> 2) edit /usr/share/plague/server/DBManager.py:
> * copy the pgdbEngineClass definition verbatim, renaming it to
> 'mysqlEngineClass'
> * the correct type for mysql in get_uid_field_type is
>     - "int(11) NOT NULL auto_increment PRIMARY KEY"
> * connect parameters are slightly different in _connect():
>     - host=host, db=database, user=user, passwd=password
> * add the new class to the db_engines array
> * add a try statement to importing the MySQLdb class
> 3) update your plague-server.cfg with a "[mysql Engine]" section
>
> And, of course, create your mysql db somewhere, etc, etc.
>
> Hope that helps someone!  :)
>
>                            -Chris
>

Hey Chris, thanks, that is helpful for me as well.  Any reason I  
can't submit a patch doing the above? :)

-Jeff




More information about the Fedora-buildsys-list mailing list