[root@vps web]# trac-admin /web/xserver initenv
Creating a new Trac environment at /web/xserver

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]> xserver

 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://root:foo@bar
@localhost:3306/xserver

Creating and Initializing Project
Initenv for '/web/xserver' failed.
Failed to create environment.
(2005, "Unknown MySQL server host 'bar@localhost' (2)")
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/trac/admin/console.py", line 455,
in do_initenv
    options=options)
  File "/usr/lib/python2.6/site-packages/trac/core.py", line 124, in
__call__
    self.__init__(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/trac/env.py", line 281, in __init__
    self.create(options)
  File "/usr/lib/python2.6/site-packages/trac/env.py", line 572, in create
    DatabaseManager(self).init_db()
  File "/usr/lib/python2.6/site-packages/trac/db/api.py", line 239, in
init_db
    connector.init_db(**args)
  File "/usr/lib/python2.6/site-packages/trac/db/mysql_backend.py", line
111, in init_db
    params)
  File "/usr/lib/python2.6/site-packages/trac/db/mysql_backend.py", line
92, in get_connection
    cnx = MySQLConnection(path, log, user, password, host, port, params)
  File "/usr/lib/python2.6/site-packages/trac/db/mysql_backend.py", line
263, in __init__
    port=port, charset='utf8', **opts)
  File "/usr/lib64/python2.6/site-packages/MySQLdb/__init__.py", line 81,
in Connect
    return Connection(*args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/MySQLdb/connections.py", line
187, in __init__
    super(Connection, self).__init__(*args, **kwargs2)
OperationalError: (2005, "Unknown MySQL server host 'bar@localhost' (2)")

Pity.. my password is foo@bar


On Thu, May 9, 2013 at 6:11 AM, RjOllos <[email protected]> wrote:

> On Wednesday, May 8, 2013 1:35:02 AM UTC-7, xiangjun zhang wrote:
>
>> I just type command:
>>
>> trac-admin /path/to/project initenv
>>
>> and when it comes to the connect strings, my database password is
>> something like this:
>>
>> mysql://root:*@*@localhost:**3306/project
>>
>>
>> escaping or quoting does not work, any help?
>>
>
> What error do you encounter? Could you post the traceback?
>
> I don't think it's necessary to do any escaping on the connection string.
> See:
> http://trac.edgewall.org/wiki/TracEnvironment#DatabaseConnectionStrings
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/trac-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/trac-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to