Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Version 5 (modified by anonymous, 14 years ago) (diff)


MySQL Setup

MySQL and Transactions

TurboGears requires transations. MySql's default database engine does support transactions (MyISAM table is the default). TurboGears requires INNODB tables.

To Transaction or Not to Transaction

By default TurboGears uses Transactions (the rest of this page applies if you want to use MySQL with Transactions).

Kevin has added a hook that allows you to disable transactions in TurboGears. If you do not want TurboGears to manage trancstions do this:

1. Kevin Dangoor
	Dec 29, 11:54 am   show options
From: Kevin Dangoor <> - Find messages by this author
Date: Thu, 29 Dec 2005 11:54:25 -0500
Local: Thurs, Dec 29 2005 11:54 am
Subject: to the mysql users with rollback exceptions
Reply | Reply to Author | Forward | Print | Individual Message | Show original | Report Abuse

As of r417, if you put notrans_ in front of the DBURI, TurboGears will
silently ignore all begin/commit/rollback/end instructions.


If you want to use Transactions, read the rest of this page :-)


when the command:

tg-admin sql create

is issued, the default table type is used.

Mike summerized the options in an excellent email.

Mike Stephen
Dec 17, 5:17 pm   show options
From: "Mike Stephen" <> - Find messages by this author
Date: Sat, 17 Dec 2005 14:17:21 -0800
Local: Sat, Dec 17 2005 5:17 pm
Subject: Re: TurboGears, MySQL, Transactions, and InnoDB tables Oh My

Hi Mike,

I'm using MySQL with turbogears and they're working very nicely
together for me. What you need to do is to configure MySQL so that it
uses InnoDB as the default storage engine as Jonathan pointed out, so
that when you issue a create table statement, it'll be an InnoDB table
by default.

Do you have the MySQL Administrator GUI installed? If so, select
StartUp Variables from the left pane, then choose the General
Parameters tab. Down the bottom you'll see a Default Storage section.
Choose InnoDB from the drop-down.

Alternatively, you could add the following line to the [mysqld] section
of your my.ini file: