Am 11.11.2017 um 11:44 schrieb Torge Riedel:
Hi,

I've set up a new server Ubuntu 16.04.3 LTS and try to migrate my existing (and 
running) trac 1.0.13 installation to 1.2.2, but this fails with

TracError: Unsupported database type "mysql"

Setting up a new environment with the same connection string gives me:

Failed to create environment.
Unsupported database type "mysql"
Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/trac/admin/console.py", line 500, in 
do_initenv
    options=options)
  File "build/bdist.linux-x86_64/egg/trac/core.py", line 136, in __call__
    self.__init__(*args, **kwargs)
  File "build/bdist.linux-x86_64/egg/trac/env.py", line 300, in __init__
    self.create(options)
  File "build/bdist.linux-x86_64/egg/trac/env.py", line 592, in create
    DatabaseManager(self).init_db()
  File "build/bdist.linux-x86_64/egg/trac/db/api.py", line 337, in init_db
    connector, args = self.get_connector()
  File "build/bdist.linux-x86_64/egg/trac/db/api.py", line 615, in get_connector
    scheme=scheme))
TracError: Unsupported database type "mysql"

So I think it is an environment/installation issue. I need help to point me to 
the right direction to find the cause. The python-mysqldb package is installed. 
But to be honest I'm not a python developer, so no idea from my site how to dig 
deeper in the code to find the root cause.

Thanks in advance
Torge


Ok, this switched to a general issue. I followed documentation on 
https://trac.edgewall.org/wiki/TracInstall and then the following call to 
initialize a new environment:

trac-admin /var/www/trac/env2 initenv

Creating a new Trac environment at /var/www/trac/env2

Trac will first ask a few questions about your environment
in order to initialize 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]> Test

 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 existing MySQL or
 PostgreSQL database (check the Trac documentation for the exact
 connection string syntax).

Database connection string [sqlite:db/trac.db]> 
mysql://tracuser:MyPwd@localhost:3306/trac

Creating and Initializing Project
Initenv for '/var/www/trac/env2' failed.
Failed to create environment.
Unsupported database type "mysql"
Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/trac/admin/console.py", line 500, in 
do_initenv
    options=options)
  File "build/bdist.linux-x86_64/egg/trac/core.py", line 136, in __call__
    self.__init__(*args, **kwargs)
  File "build/bdist.linux-x86_64/egg/trac/env.py", line 300, in __init__
    self.create(options)
  File "build/bdist.linux-x86_64/egg/trac/env.py", line 592, in create
    DatabaseManager(self).init_db()
  File "build/bdist.linux-x86_64/egg/trac/db/api.py", line 337, in init_db
    connector, args = self.get_connector()
  File "build/bdist.linux-x86_64/egg/trac/db/api.py", line 615, in get_connector
    scheme=scheme))
TracError: Unsupported database type "mysql"


Looks no good. I checked the following:

- mysql -utracuser -p      > giving the same password results in a successful login, db 
"trac" can be shown and tables too
- php -m shows following output

[PHP Modules]
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
igbinary
intl
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
redis
Reflection
session
shmop
SimpleXML
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

- apt-get install python-mysqldb displays

Reading package lists... Done
Building dependency tree
Reading state information... Done
python-mysqldb is already the newest version (1.3.7-1build2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Any ideas what to check further.

Thanks in advance
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