Am 13.11.2017 um 12:55 schrieb RjOllos:


On Sunday, November 12, 2017 at 12:12:11 PM UTC-5, torgeriedel wrote:

    Ok, one more test, since trac is using MySQLdb I searched the code and 
extracted this short test code. And it works:

    # python
    Python 2.7.12 (default, Nov 19 2016, 06:48:10)
    [GCC 5.4.0 20160609] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from trac.util import get_pkginfo
    >>> import MySQLdb
    >>> import MySQLdb.cursors
    >>> mysqldb_version = get_pkginfo(MySQLdb).get('version', 
MySQLdb.__version__)
    >>> print("MySQLdb.version = {}".format(mysqldb_version))
    MySQLdb.version = 1.3.7
    >>> con = MySQLdb.connect('localhost', 'tracuser', 'thung0hohF6no3ah', 
'trac')
    >>> cur = con.cursor()
    >>> cur.execute("SHOW TABLES")
    19L
    >>> for (table_name) in cur:
    ...   print("- {}".format(table_name))
    ...
    - ('attachment',)
    - ('auth_cookie',)
    - ('cache',)
    - ('component',)
    - ('enum',)
    - ('milestone',)
    - ('node_change',)
    - ('permission',)
    - ('report',)
    - ('repository',)
    - ('revision',)
    - ('session',)
    - ('session_attribute',)
    - ('system',)
    - ('ticket',)
    - ('ticket_change',)
    - ('ticket_custom',)
    - ('version',)
    - ('wiki',)
    >>> cur.close()
    >>> con.close()
    >>> quit()



Here is another command to try from the Python shell:
>>> from trac.db.mysql_backend import has_mysqldb
>>> has_mysqldb
True
>>> from trac.db.mysql_backend import mysqldb_version
>>> mysqldb_version
'1.2.5'

You might have the wrong MySQL database bindings installed. You need this one:
https://pypi.python.org/pypi/MySQL-python

Going from version numbers, it looks like you have this one:
https://pypi.python.org/pypi/mysqlclient/1.3.7

Side note, for the forthcoming Trac 1.4 release we've switched to PyMySQL:
https://trac.edgewall.org/wiki/MySqlDb#Trac1.3.2

and the following may be relevant to your situation:
https://trac.edgewall.org/ticket/12821#comment:13

- Ryan

--
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 
trac-users+unsubscr...@googlegroups.com 
<mailto:trac-users+unsubscr...@googlegroups.com>.
To post to this group, send email to trac-users@googlegroups.com 
<mailto:trac-users@googlegroups.com>.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.

Hi Ryan,

you are right it is the "wrong" database binding.

But taking a look at https://pypi.python.org/pypi/MySQL-python/1.2.5 I see, that 
this is really old (2014-01-02) and does not support MySql > 5.5 (as I 
understand). But Ubuntu 16.04 LTS comes with MySQL 5.7.

Taking a look at https://pypi.python.org/pypi/mysqlclient I read, that this is a 
fork of the other binding and supports MySQL >= 5.5 and py2.7.

That's why this binding (1.3.7) is installed when I execute apt-get install 
python-mysqldb and not the older one (1.2.5).

Imho my feeling is that there is currently no chance to get trac running with MySQL on 
Ubuntu 16.04? Is there any chance to patch "my" Trac 1.2.2 in a way to work 
with the newer binding?

Regards
Torge

--
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to