Edgewall Software
Modify

Ticket #4017 (closed defect: worksforme)

Opened 5 years ago

Last modified 3 years ago

initenv problem with MySQL - Access Denied

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

Description (last modified by mgood) (diff)

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

Change History

comment:1 Changed 5 years ago by mgood

  • Description modified (diff)
  • Priority changed from highest to normal
  • Resolution set to worksforme
  • Severity changed from blocker to normal
  • Status changed from new to closed

"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 Changed 4 years ago by anonymous

  • Milestone set to 0.11
  • Priority changed from normal to high
  • Resolution worksforme deleted
  • Status changed from closed to reopened
  • Version changed from 0.10 to 0.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 ?

comment:3 Changed 4 years ago by nkantrowitz

  • Milestone 0.11 deleted
  • Priority changed from high to normal
  • Resolution set to worksforme
  • Status changed from reopened to closed

Please read Matt's comment.

comment:4 Changed 4 years ago by martin.dames@…

  • Keywords mysql access denied password initenv added
  • Version changed from 0.11b1 to 0.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.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from cmlenz. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.