Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#3650 closed defect (invalid)

using [ $ trac-admin /path/to/projectenv initenv ]:Failed to create environment. server is too old to set charset

Reported by: sean@… Owned by: daniel
Priority: highest Milestone:
Component: admin/console Version: 0.10b1
Severity: blocker Keywords: mysql
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Matthew Good)

Hi Im trynig to evaluate your software. but am having trouble creating the projectenv. using varsion: trac-0.10b1 using $ trac-admin /path/to/projectenv initenv

and I tried against both these versions of mysql and get the same errors. mysql Ver 12.22 Distrib 4.0.20, for mandrake-linux-gnu (i586) mysql Ver 14.12 Distrib 5.0.24, for pc-linux-gnu (i686) using readline 5.0

cheers Sean

I eventually get these errors

 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. server is too old to set charset
Traceback (most recent call last):
  File "/usr/lib/python2.3/site-packages/trac/scripts/admin.py", line 611, in do_initenv
    options=options)
  File "/usr/lib/python2.3/site-packages/trac/env.py", line 124, in __init__
    self.create(options)
  File "/usr/lib/python2.3/site-packages/trac/env.py", line 228, in create
    DatabaseManager(self).init_db()
  File "/usr/lib/python2.3/site-packages/trac/db/api.py", line 65, in init_db
    connector.init_db(**args)
  File "/usr/lib/python2.3/site-packages/trac/db/mysql_backend.py", line 44, in init_db
    cnx = self.get_connection(path, user, password, host, port, params)
  File "/usr/lib/python2.3/site-packages/trac/db/mysql_backend.py", line 40, in get_connection
    return MySQLConnection(path, user, password, host, port, params)
  File "/usr/lib/python2.3/site-packages/trac/db/mysql_backend.py", line 140, in __init__
    host=host, port=port, charset='utf8')
  File "/usr/lib/python2.3/site-packages/MySQLdb/__init__.py", line 75, in Connect
    return Connection(*args, **kwargs)
  File "/usr/lib/python2.3/site-packages/MySQLdb/connections.py", line 192, in __init__
    self.set_character_set(charset)
  File "/usr/lib/python2.3/site-packages/MySQLdb/connections.py", line 265, in set_character_set
    raise NotSupportedError, "server is too old to set charset"
NotSupportedError: server is too old to set charset
Failed to initialize environment. 1
Traceback (most recent call last):
  File "/usr/lib/python2.3/site-packages/trac/scripts/admin.py", line 615, in do_initenv
    sys.exit(1)
SystemExit: 1

Attachments (0)

Change History (2)

comment:1 by Matthew Good, 18 years ago

Description: modified (diff)
Keywords: needinfo added
Version: 0.9.60.10b1

Trac requires MySQL 4.1 or later: TracInstall#ForMySQL

The MySQLdb library raises that error if you try to set the charset when using a MySQL server older than 4.1.

If you're still experiencing problems with MySQL 5.0 there may be a problem with the version detection in MySQLdb and you will need to file a bug on their site: http://sourceforge.net/projects/mysql-python

You can confirm the MySQL version of your server detected by MySQLdb using the Python interpreter:

mgood@virgil:~$ python
Python 2.4.1 (#2, May  5 2005, 11:32:06)
[GCC 3.3.5 (Debian 1:3.3.5-12)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import MySQLdb
>>> cnx = MySQLdb.connect(host='your_host', user='your_user', passwd='your_password')
>>> cnx.get_server_info()
'4.1.14-Debian_5-log'
>>>

comment:2 by Christian Boos, 18 years ago

Keywords: mysql added; needinfo removed
Resolution: invalid
Status: newclosed

Sean was probably successful in upgrading his MySQL installation…

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain daniel.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from daniel 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.