Modify ↓
Opened 18 years ago
Closed 18 years ago
#5138 closed defect (worksforme)
trac doesn't support multiple instances with MySQL (0.10.4dev)
Reported by: | Owned by: | Jonas Borgström | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | general | Version: | devel |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description (last modified by )
Trying to make a second trac instance (the first works fine) with trac 0.10.4dev doesn't work, erring out that the table 'system' already exists. Output:
(trac)> trac-admin deliverance initenv Creating a new Trac environment at /usr/local/topp/trac/deliverance 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]> deliverance 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:*****@localhost:3306/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]> Please enter location of Trac page templates. Default is the location of the site-wide templates installed with Trac. Templates directory [/usr/local/topp/trac/share/trac/templates]> Creating and Initializing Project Failed to create environment. (1050, "Table 'system' already exists") Traceback (most recent call last): File "/usr/local/topp/trac/lib64/python2.4/site-packages/trac/scripts/admin.py", line 613, in do_initenv options=options) File "/usr/local/topp/trac/lib64/python2.4/site-packages/trac/env.py", line 145, in __init__ self.create(options) File "/usr/local/topp/trac/lib64/python2.4/site-packages/trac/env.py", line 250, in create DatabaseManager(self).init_db() File "/usr/local/topp/trac/lib64/python2.4/site-packages/trac/db/api.py", line 69, in init_db connector.init_db(**args) File "/usr/local/topp/trac/lib64/python2.4/site-packages/trac/db/mysql_backend.py", line 50, in init_db cursor.execute(stmt) File "/usr/local/topp/trac/lib64/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: (1050, "Table 'system' already exists") Failed to initialize environment. 1 Traceback (most recent call last): File "/usr/local/topp/trac/lib64/python2.4/site-packages/trac/scripts/admin.py", line 617, in do_initenv sys.exit(1) SystemExit: 1
Attachments (0)
Change History (2)
comment:1 by , 18 years ago
comment:2 by , 18 years ago
Description: | modified (diff) |
---|---|
Resolution: | → worksforme |
Status: | new → closed |
Yes, as hyuga said you need to create separate databases for your projects.
Note:
See TracTickets
for help on using tickets.
Well, you can't use the same database for multiple Trac environments. That might get a little confusing ;) Create a new MySQL database for your new project.