[Trac] Error initializing project with MySQL

2011-05-20 Thread Ryan Elliott Turner
Hello list,

I'm trying to create my first trac project, and I'm having issues with
getting it to work with MySQL. I've installed MySQL-python, and on the
configuration script after running sudo trac-admin /*dir_here* initenv
using the connection string mysql://user:pw@127.0.0.1/db (credentials
check out too, I've connected using mysql workbench), I get the
following errors:

Creating and Initializing Project
Initenv for '/usr/local/trac' failed.
Failed to create environment.
(2003, Can't connect to MySQL server on '127.0.0.1' (111))
Traceback (most recent call last):
  File build/bdist.linux-x86_64/egg/trac/admin/console.py, line 422,
in do_initenv
  File build/bdist.linux-x86_64/egg/trac/env.py, line 213, in
__init__
  File build/bdist.linux-x86_64/egg/trac/env.py, line 401, in create
  File build/bdist.linux-x86_64/egg/trac/db/api.py, line 146, in
init_db
  File build/bdist.linux-x86_64/egg/trac/db/mysql_backend.py, line
101, in init_db
  File build/bdist.linux-x86_64/egg/trac/db/mysql_backend.py, line
85, in get_connection
  File build/bdist.linux-x86_64/egg/trac/db/mysql_backend.py, line
228, in __init__
  File /usr/lib64/python2.4/site-packages/MySQLdb/__init__.py, line
75, in Connect
return Connection(*args, **kwargs)
  File /usr/lib64/python2.4/site-packages/MySQLdb/connections.py,
line 164, in __init__
super(Connection, self).__init__(*args, **kwargs2)
OperationalError: (2003, Can't connect to MySQL server on
'127.0.0.1' (111))
Initenv for '/usr/local/trac' failed.
1
Traceback (most recent call last):
  File build/bdist.linux-x86_64/egg/trac/admin/console.py, line 427,
in do_initenv
SystemExit: 1

Any clues as to how to fix this?

-- 
You received this message because you are subscribed to the Google Groups Trac 
Users group.
To post to this group, send email to trac-users@googlegroups.com.
To unsubscribe from this group, send email to 
trac-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.



Re: [Trac] Error initializing project with MySQL

2011-05-20 Thread Matthew Caron

On 05/19/2011 05:18 PM, Ryan Elliott Turner wrote:

using the connection string mysql://user:pw@127.0.0.1/db (credentials
check out too, I've connected using mysql workbench),


Double check this. I'm not familiar with mysql workbench, but users 
access is scoped in mysql. If you're connecting to it on localhost with 
trac, and from another machine with the workbench, it could succeed in 
one case and fail in another. You need to make sure that the user can 
access it the same way.


To get a proper list, do:

mysql -u root -p

(log in)

use user;
select User, Host from user;

You'll get a list of users and from where they are allowed to connect.

--
Matthew Caron
Build Engineer
Sixnet | www.sixnet.com
O +1 518 877 5173 Ext. 138
F +1 518 602 9209
matt.ca...@sixnet.com

--
You received this message because you are subscribed to the Google Groups Trac 
Users group.
To post to this group, send email to trac-users@googlegroups.com.
To unsubscribe from this group, send email to 
trac-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.