Christian Rasmussen wrote:
> Hi there, I'm in the progress of starting a new software development
> project.
> In order to gain more control with files, knowledge etc. etc. I've
> decided to try and get a Trac system up and running on our server - but
> I'm having a bit of trouble getting it working as desired. Due to
> various reasons I'm restricted to using only MySQL as database,
> therefore I've tried to get the development version of 0.10 to work
> untill a stable version is released.
>  
> The server I'm trying to get it installed on, is running Gentoo and all
> dependencies should be met.
> I'm relatively new with linux, therefore I might explain things in more
> detail that might be nescessary - but please bear with me.
>  
> First I got a hold of the development version via Subversion, where I
> made a checkout from http://svn.edgewall.com/repos/trac/trunk and after
> that was completed I ran the command: 'python ./setup.py install' from a
> terminal in the folder I checked out into.
>  
> After that I ran the 'trac-admin /path/to/my/new/project initenv' and
> filled out the questions asked during. Just when I've given it the
> location of my SVN directory and I says to start initialize the project,
> I get the following message:
>  
> Creating and Initializing Project
> Failed to create environment. (1071, 'Specified key was too long; max
> key length is 1000 bytes')
> Traceback (most recent call last):
>   File "/usr/lib/python2.4/site-packages/trac/scripts/admin.py", line
> 611, in do_initenv
>     options=options)
>   File "/usr/lib/python2.4/site-packages/trac/env.py", line 124, in __init__
>     self.create(options)
>   File "/usr/lib/python2.4/site-packages/trac/env.py", line 228, in create
>     DatabaseManager(self).init_db()
>   File "/usr/lib/python2.4/site-packages/trac/db/api.py", line 65, in
> init_db
>     connector.init_db(**args)
>   File "/usr/lib/python2.4/site-packages/trac/db/mysql_backend.py", line
> 50, in init_db
>     cursor.execute(stmt)
>   File "/usr/lib/python2.4/site-packages/trac/db/util.py", line 48, in
> execute
>     return self.cursor.execute(sql)
>   File "/usr/lib/python2.4/site-packages/MySQLdb/cursors.py", line 137,
> in execute
>     self.errorhandler(self, exc, value)
>   File "/usr/lib/python2.4/site-packages/MySQLdb/connections.py", line
> 33, in defaulterrorhandler
>     raise errorclass, errorvalue
> OperationalError: (1071, 'Specified key was too long; max key length is
> 1000 bytes')
> Failed to initialize environment. 1
> Traceback (most recent call last):
>   File "/usr/lib/python2.4/site-packages/trac/scripts/admin.py", line
> 615, in do_initenv
>     sys.exit(1)
> SystemExit: 1
>  

Not sure on this issue.  What's above line 48 in trac.db.util.py, or what's
above trac/db.mysql_backend.py line 50?  i.e. what SQL statement was trying to
execute?

> I tried to ignore the message, and see what happened if I started up the
> built-in server at accessed the project anyways. When trying to access
> the server I get the following error message:
> "(The Trac Environment needs to be upgraded. Run trac-admin
> /var/trac/testtrac upgrade")"
>  
> and when trying to execute the above command I get this error:
> "Command failed: Can only backup sqlite databases"

Trac indeed, can only back up SQLite databases.  So, you should back up your
MySQL database manually, and then run the trac-admin command with a -b option,
meaning skip the backup.  I do this with Postgres...

BA
_______________________________________________
Trac mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac

Reply via email to