1

Topic: Error: mysql(127.0.0.1): Connect failed to database (iredadmin)

Hi Zhang,

I have just install iredmail , and i have delete accidently the password of iredadmin in the file settings.ini from /usr/share/apache2/iredamin
There is the lines:
[iredadmin]
# Database used to store iRedAdmin data. e.g. sessions, log.
host =  127.0.0.1
port =  3306
  db = iredadmin
user = iredadmin
passwd = ...

And now when i would like to delete a message from my email box i have this error:
Error: mysql(127.0.0.1): Connect failed to database (iredadmin): Access denied for user 'iredadmin'@'localhost' (using password: YES) - waiting for 125 seconds before retry

Please how can i change this password and what's kind of cryption of password.

Thank's for help


==== Required information ====
- iRedMail version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Linux/BSD distribution name and version:
- Related log if you're reporting an issue:
====

----

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

2

Re: Error: mysql(127.0.0.1): Connect failed to database (iredadmin)

Zhang may have a better solution, but in the meantime; you can create a new user w/ password in mysql and replace the "user=" and "passwd=" lines to the new ones. Alternately, if you kept the tips file you may be able to glean the information from it. mine was originally written to  /tmp/iRedMail-0.8.4/iRedMail.tips. locate yours using find / -iname iRedMail.tips.

In the future I would make a backup of any config files before opening them with an editor.

Good luck

3

Re: Error: mysql(127.0.0.1): Connect failed to database (iredadmin)

hi,
Thank's for the replay, i have keep the iRedmail.tips, in with line i found the password???
And in wich encryption is the password, i look in table users of my sql i found many type of encryption.
Thank's for help.

tuneapc wrote:

Zhang may have a better solution, but in the meantime; you can create a new user w/ password in mysql and replace the "user=" and "passwd=" lines to the new ones. Alternately, if you kept the tips file you may be able to glean the information from it. mine was originally written to  /tmp/iRedMail-0.8.4/iRedMail.tips. locate yours using find / -iname iRedMail.tips.

In the future I would make a backup of any config files before opening them with an editor.

Good luck

4

Re: Error: mysql(127.0.0.1): Connect failed to database (iredadmin)

lili wrote:

hi,
Thank's for the replay, i have keep the iRedmail.tips, in with line i found the password???
And in wich encryption is the password, i look in table users of my sql i found many type of encryption.
Thank's for help.

tuneapc wrote:

Zhang may have a better solution, but in the meantime; you can create a new user w/ password in mysql and replace the "user=" and "passwd=" lines to the new ones. Alternately, if you kept the tips file you may be able to glean the information from it. mine was originally written to  /tmp/iRedMail-0.8.4/iRedMail.tips. locate yours using find / -iname iRedMail.tips.

In the future I would make a backup of any config files before opening them with an editor.

Good luck

After looking, the password for iredadmin is not in the tips file, so you will have to create a new user on database iredadmin with and hope that encryption is not used. If encryption is used, I would have no idea how to invoke the encryption routine. Best bet is a reinstall.

5

Re: Error: mysql(127.0.0.1): Connect failed to database (iredadmin)

lili, why you don't change the password for user iredadmin and then set it in ten ini file?

Login into mysql and use the SET PASSWORD as described in mysql manual.

If you don't have mysql root password, you can recover it.

6

Re: Error: mysql(127.0.0.1): Connect failed to database (iredadmin)

*) Set a new password for MySQL user "iredadmin@localhost" is OK.
*) You can find all MySQL usernames/passwords in iRedMail.tips, or iRedMail-0.8.4/config (this file is generated during iRedMail installation). If you can find the one you want, please report it as a bug here: https://bitbucket.org/zhb/iredmail/issues

I checked iRedMail source code, it doesn't log MySQL user "iredadmin". I will fix it in next release. Sorry about this trouble.

7

Re: Error: mysql(127.0.0.1): Connect failed to database (iredadmin)

Hi Zhang;
I made a new installation of iredmail.

8

Re: Error: mysql(127.0.0.1): Connect failed to database (iredadmin)

Does the same issue occur?