Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

#4833 closed defect (duplicate)

MySQL initenv crash

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 (last modified by Christian Boos)

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 [sqlite: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

Attachments (0)

Change History (1)

comment:1 by Christian Boos, 18 years ago

Description: modified (diff)
Resolution: duplicate
Status: newclosed

Duplicate of #3676, which is fixed in 0.10.4dev.

Please try to install the latest stable version and check whether this works for you (we're interested in confirmation of the fix). If not, please reopen this ticket.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.