Edgewall Software

Opened 17 years ago

Last modified 17 years ago

#4833 closed defect

MySQL initenv crash — at Initial Version

Reported by: CNU Owned by: Jonas Borgström
Priority: normal Milestone:
Component: general Version: 0.10.3
Severity: normal Keywords: mysql
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I'm using Gentoo. trac worked nice with sqlite, just wanted to try MySQL too. I created user/database with phpmyadmin first. I can see one table called "system" in the database with two fields: name and value. It's probably me doing something wrong, because I'm not good with Linux

root # mysql —version mysql Ver 14.12 Distrib 5.0.26, for pc-linux-gnu (i686) using readline 5.1

root # trac-admin /var/lib/trac/cnuBlah initenv Creating a new Trac environment at /var/lib/trac/cnuBlah

Trac will first ask a few questions about your environment in order to initalize and prepare the project database.

Please enter the name of your project. This name will be used in page titles and descriptions.

Project Name [My Project]> cnuBlah

Please specify the connection string for the database to use. By default, a local SQLite database is created in the environment directory. It is also possible to use an already existing PostgreSQL database (check the Trac documentation for the exact connection string syntax).

Database connection string db/trac.db> mysql://trac:****************@127.0.0.1/trac

Please specify the type of version control system, By default, it will be svn.

If you don't want to use Trac with version control integration, choose the default here and don't specify a repository directory. in the next question.

Repository type [svn]>

Please specify the absolute path to the version control repository, or leave it blank to use Trac without a repository. You can also set the repository location later.

Path to repository path/to/repos> /var/svn/repos

Please enter location of Trac page templates. Default is the location of the site-wide templates installed with Trac.

Templates directory usr/share/trac/templates>

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 613, 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 229, in create

DatabaseManager(self).init_db()

File "/usr/lib/python2.4/site-packages/trac/db/api.py", line 69, 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 51, in execute

return self.cursor.execute(sql)

File "/usr/lib/python2.4/site-packages/MySQLdb/cursors.py", line 163, in execute

self.errorhandler(self, exc, value)

File "/usr/lib/python2.4/site-packages/MySQLdb/connections.py", line 35, 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 617, in do_initenv

sys.exit(1)

SystemExit: 1

Change History (0)

Note: See TracTickets for help on using tickets.