1

Topic: Password for mySQL for iRedAPD file location?

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.7
- Linux/BSD distribution name and version: Debian 9
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MariaDB
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro?: No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Greetings! I had to change some passwords for some things to get things working correctly on a previously messed up upgrade from Debian 8 to 9. I've managed to get almost everything working again by creating a VM, copying configuration files over from the VM, and changing passwords for the databases, to match the passwords that are used for MySQL on my existing production machine. Lately, I've been getting an error from iRedAPD, because I didn't change the password in one of the configuration files in order to give iRedAPD access to the vmail database on my machine. I can't figure out which configuration file for iRedAPD that I need to update the database password in. Since having updated everything, I've been getting this error in my inbox from a failed cron job, because the iRedAPD password is wrong for MySQL.

Traceback (most recent call last):
File "/opt/www/iredadmin/tools/delete_mailboxes.py", line 158, in <module>
   qr = conn.select('deleted_mailboxes', where=sql_where)
File "/usr/lib/python2.7/dist-packages/web/db.py", line 699, in select
   return self.query(qout, processed=True)
File "/usr/lib/python2.7/dist-packages/web/db.py", line 658, in query
   db_cursor = self._db_cursor()
File "/usr/lib/python2.7/dist-packages/web/db.py", line 570, in _db_cursor
   return self.ctx.db.cursor()
File "/usr/lib/python2.7/dist-packages/web/db.py", line 511, in _getctx
   self._load_context(self._ctx)
File "/usr/lib/python2.7/dist-packages/web/db.py", line 522, in _load_context
   ctx.db = self._connect(self.keywords)
File "/usr/lib/python2.7/dist-packages/web/db.py", line 550, in _connect
   return self.db_module.connect(**keywords)
File "/usr/lib/python2.7/dist-packages/MySQLdb/__init__.py", line 81, in Connect
   return Connection(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 204, in __init__
   super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError: (1045, "Access denied for user 'vmailadmin'@'localhost' (using password: YES)")

If someone could please point me in the direction of the correct file to change this password in, I would be really grateful!

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Password for mySQL for iRedAPD file location?

FYI: http://www.iredmail.org/docs/file.locat … ml#iredapd

3 (edited by SteveLuxe 2017-08-22 10:12:47)

Re: Password for mySQL for iRedAPD file location?

Thanks Zhang... One other question... do you know what file I should edit in order to fix this?

(From /var/log/apache/error.log)

[Mon Aug 21 22:09:57.568110 2017] [wsgi:error] [pid 889] [remote 192.168.1.1:56159] Traceback (most recent call last):
[Mon Aug 21 22:09:57.568523 2017] [wsgi:error] [pid 889] [remote 192.168.1.1:56159]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 239, in process
[Mon Aug 21 22:09:57.568595 2017] [wsgi:error] [pid 889] [remote 192.168.1.1:56159]     return self.handle()
[Mon Aug 21 22:09:57.568627 2017] [wsgi:error] [pid 889] [remote 192.168.1.1:56159]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 230, in handle
[Mon Aug 21 22:09:57.568656 2017] [wsgi:error] [pid 889] [remote 192.168.1.1:56159]     return self._delegate(fn, self.fvars, args)
[Mon Aug 21 22:09:57.568685 2017] [wsgi:error] [pid 889] [remote 192.168.1.1:56159]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 462, in _delegate
[Mon Aug 21 22:09:57.568715 2017] [wsgi:error] [pid 889] [remote 192.168.1.1:56159]     return handle_class(cls)
[Mon Aug 21 22:09:57.568793 2017] [wsgi:error] [pid 889] [remote 192.168.1.1:56159]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 438, in handle_class
[Mon Aug 21 22:09:57.568824 2017] [wsgi:error] [pid 889] [remote 192.168.1.1:56159]     return tocall(*args)
[Mon Aug 21 22:09:57.568853 2017] [wsgi:error] [pid 889] [remote 192.168.1.1:56159]   File "/opt/www/iredadmin/controllers/mysql/basic.py", line 39, in POST
[Mon Aug 21 22:09:57.568883 2017] [wsgi:error] [pid 889] [remote 192.168.1.1:56159]     auth_result = auth.auth(username=username, password=password)
[Mon Aug 21 22:09:57.568913 2017] [wsgi:error] [pid 889] [remote 192.168.1.1:56159]   File "/opt/www/iredadmin/libs/mysql/core.py", line 224, in auth
[Mon Aug 21 22:09:57.569012 2017] [wsgi:error] [pid 889] [remote 192.168.1.1:56159]     limit=1,
[Mon Aug 21 22:09:57.569041 2017] [wsgi:error] [pid 889] [remote 192.168.1.1:56159]   File "/usr/lib/python2.7/dist-packages/web/db.py", line 699, in select
[Mon Aug 21 22:09:57.569071 2017] [wsgi:error] [pid 889] [remote 192.168.1.1:56159]     return self.query(qout, processed=True)
[Mon Aug 21 22:09:57.569101 2017] [wsgi:error] [pid 889] [remote 192.168.1.1:56159]   File "/usr/lib/python2.7/dist-packages/web/db.py", line 658, in query
[Mon Aug 21 22:09:57.569131 2017] [wsgi:error] [pid 889] [remote 192.168.1.1:56159]     db_cursor = self._db_cursor()
[Mon Aug 21 22:09:57.569159 2017] [wsgi:error] [pid 889] [remote 192.168.1.1:56159]   File "/usr/lib/python2.7/dist-packages/web/db.py", line 570, in _db_cursor
[Mon Aug 21 22:09:57.569189 2017] [wsgi:error] [pid 889] [remote 192.168.1.1:56159]     return self.ctx.db.cursor()
[Mon Aug 21 22:09:57.569217 2017] [wsgi:error] [pid 889] [remote 192.168.1.1:56159]   File "/usr/lib/python2.7/dist-packages/web/db.py", line 511, in _getctx
[Mon Aug 21 22:09:57.569247 2017] [wsgi:error] [pid 889] [remote 192.168.1.1:56159]     self._load_context(self._ctx)
[Mon Aug 21 22:09:57.569277 2017] [wsgi:error] [pid 889] [remote 192.168.1.1:56159]   File "/usr/lib/python2.7/dist-packages/web/db.py", line 522, in _load_context
[Mon Aug 21 22:09:57.569306 2017] [wsgi:error] [pid 889] [remote 192.168.1.1:56159]     ctx.db = self._connect(self.keywords)
[Mon Aug 21 22:09:57.569335 2017] [wsgi:error] [pid 889] [remote 192.168.1.1:56159]   File "/usr/lib/python2.7/dist-packages/web/db.py", line 550, in _connect
[Mon Aug 21 22:09:57.569364 2017] [wsgi:error] [pid 889] [remote 192.168.1.1:56159]     return self.db_module.connect(**keywords)
[Mon Aug 21 22:09:57.569393 2017] [wsgi:error] [pid 889] [remote 192.168.1.1:56159]   File "/usr/lib/python2.7/dist-packages/MySQLdb/__init__.py", line 81, in Connect
[Mon Aug 21 22:09:57.569423 2017] [wsgi:error] [pid 889] [remote 192.168.1.1:56159]     return Connection(*args, **kwargs)
[Mon Aug 21 22:09:57.569452 2017] [wsgi:error] [pid 889] [remote 192.168.1.1:56159]   File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 204, in __init__
[Mon Aug 21 22:09:57.569482 2017] [wsgi:error] [pid 889] [remote 192.168.1.1:56159]     super(Connection, self).__init__(*args, **kwargs2)
[Mon Aug 21 22:09:57.569511 2017] [wsgi:error] [pid 889] [remote 192.168.1.1:56159] OperationalError: (1045, "Access denied for user 'vmailadmin'@'localhost' (using password: YES)")
[Mon Aug 21 22:09:57.569606 2017] [wsgi:error] [pid 889] [remote 192.168.1.1:56159]

I get this when I'm logging in to iRedAdmin now... Many thanks in advance!

4

Re: Password for mySQL for iRedAPD file location?

SteveLuxe wrote:

[Mon Aug 21 22:09:57.569511 2017] [wsgi:error] [pid 889] [remote 192.168.1.1:56159] OperationalError: (1045, "Access denied for user 'vmailadmin'@'localhost' (using password: YES)")

iRedAdmin config file: http://www.iredmail.org/docs/file.locat … #iredadmin

5

Re: Password for mySQL for iRedAPD file location?

Thank you SO much, Zhang!

6

Re: Password for mySQL for iRedAPD file location?

Bought you a coffee!

7

Re: Password for mySQL for iRedAPD file location?

Thank you very much for buying me coffee. smile