Edgewall Software

Ticket #4017 (closed defect: worksforme)

Opened 2 years ago

Last modified 8 months 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:

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

Changed 2 years ago by mgood

  • priority changed from highest to normal
  • status changed from new to closed
  • resolution set to worksforme
  • description modified (diff)
  • severity changed from blocker to normal

"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.

Changed 13 months ago by anonymous

  • priority changed from normal to high
  • status changed from closed to reopened
  • version changed from 0.10 to 0.11b1
  • resolution worksforme deleted
  • milestone set to 0.11

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 ?

Changed 13 months ago by nkantrowitz

  • priority changed from high to normal
  • status changed from reopened to closed
  • resolution set to worksforme
  • milestone 0.11 deleted

Please read Matt's comment.

Changed 8 months 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.

Add/Change #4017 (initenv problem with MySQL - Access Denied)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from cmlenz. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.