Edgewall Software
Modify

Opened 17 years ago

Closed 16 years ago

Last modified 7 years ago

#4017 closed defect (worksforme)

initenv problem with MySQL - Access Denied

Reported by: stekut@… Owned by:
Priority: normal Milestone:
Component: admin/console Version: 0.10.4
Severity: normal Keywords: mysql access denied password initenv
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Matthew Good)

Creating and Initializing Project

Failed to create environment. (1045, "Access denied for user 'frreki'@'localhost' (using password: YES)")
Traceback (most recent call last):
  File "/usr/local/lib/python2.3/site-packages/trac/scripts/admin.py", line 611, in do_initenv
    options=options)
  File "/usr/local/lib/python2.3/site-packages/trac/env.py", line 124, in __init__
    self.create(options)
  File "/usr/local/lib/python2.3/site-packages/trac/env.py", line 228, in create
    DatabaseManager(self).init_db()
  File "/usr/local/lib/python2.3/site-packages/trac/db/api.py", line 65, in init_db
    connector.init_db(**args)
  File "/usr/local/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/local/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/local/lib/python2.3/site-packages/trac/db/mysql_backend.py", line 140, in __init__
    host=host, port=port, charset='utf8')
  File "/usr/local/lib/python2.3/site-packages/MySQLdb/__init__.py", line 75, in Connect
    return Connection(*args, **kwargs)
  File "/usr/local/lib/python2.3/site-packages/MySQLdb/connections.py", line 164, in __init__
    super(Connection, self).__init__(*args, **kwargs2)
OperationalError: (1045, "Access denied for user 'frreki'@'localhost' (using password: YES)")
Failed to initialize environment. 1
Traceback (most recent call last):
  File "/usr/local/lib/python2.3/site-packages/trac/scripts/admin.py", line 615, in do_initenv
    sys.exit(1)
SystemExit: 1

Attachments (0)

Change History (7)

comment:1 by Matthew Good, 17 years ago

Description: modified (diff)
Priority: highestnormal
Resolution: worksforme
Severity: blockernormal
Status: newclosed

"Access denied for user 'frreki'@'localhost' (using password: YES)" means that either the username or password is incorrect, or they don't have permission to access the Trac database. Please check the user and permissions. You may need to reload the MySQL server after changing permissions. Please consult the MySQL documentation if necessary, and use the MailingList if you need further support.

comment:2 by anonymous, 16 years ago

Milestone: 0.11
Priority: normalhigh
Resolution: worksforme
Status: closedreopened
Version: 0.100.11b1

Database changed

mysql> grant all privileges on trac.* to trac@localhost identified by 'trac';
Query OK, 0 rows affected (0.00 sec)

mysql> use trac;
Database changed
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

ERROR;
OperationalError: (1045, "Access denied for user 'trac'@'localhost' (using password: YES)")

WHY ?

Last edited 9 years ago by Ryan J Ollos (previous) (diff)

comment:3 by Noah Kantrowitz, 16 years ago

Milestone: 0.11
Priority: highnormal
Resolution: worksforme
Status: reopenedclosed

Please read Matt's comment.

comment:4 by martin.dames@…, 16 years ago

Keywords: mysql access denied password initenv added
Version: 0.11b10.10.4

I had the same problem by trac 0.10.4. The solution was to change the password from the MySQL user, which was probably to cryptic (contained an '$' sign). I reproduced this on a virtuel linux machine with 0.10.3 and the solution was the same. I did not use other passwords with a dollar sign. Hope that helped you guys.

Martin.

comment:5 by jason@…, 9 years ago

Hello,

I am having this same issue. My password does not contain any special symbols. Any clues?

in reply to:  5 comment:6 by arcadius <arcadius@…>, 7 years ago

Replying to jason@…:

Hello,

I am having this same issue. My password does not contain any special symbols. Any clues?

See #12698.

comment:7 by Jun Omae, 7 years ago

Owner: Christopher Lenz removed

Modify Ticket

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