1 (edited by annonman 2017-02-01 07:01:42)

Topic: Upgrade iRedAdmin: CREATE command denied to user 'iredadmin'@'localho

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.6
- Linux/BSD distribution name and version: Centos 6.8
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  LDAP
- Web server (Apache or Nginx):Nginx
- Manage mail accounts with iRedAdmin-Pro? N
- Related log if you're reporting an issue:

Hi,

Note the error:

ERROR 1142 (42000) at line 8 in file: '/var/www/iredadmin/SQL/iredadmin.mysql': CREATE command denied to user 'iredadmin'@'localhost' for table 'sessions' below.


Upgrade iRedAdmin (open source edition) to the latest stable release (0.7):

...

[root@mail tools]#  bash upgrade_iredadmin.sh
* Detected Linux/BSD distribution: RHEL
* HTTP server root: /var/www
* Found iRedAdmin directory: /var/www/iredadmin, symbol link of iRedAdmin-0.6
* Found iRedAdmin config file: /var/www/iredadmin/settings.py
* Copying new version to /var/www/iRedAdmin-0.7
* Removing old symbol link /var/www/iredadmin
* Creating symbol link /var/www/iredadmin to /var/www/iRedAdmin-0.7
* Delete all existing sessions, admins are forced to re-login to iRedAdmin.
* Check and install dependent Python modules:
  + [required] json or simplejson
  + [required] dnspython
  + [required] pycurl
  + [optional] BeautifulSoup
  + [optional] lxml
* Check SQL tables, and add missed ones - if there's any
ERROR 1142 (42000) at line 8 in file: '/var/www/iredadmin/SQL/iredadmin.mysql': CREATE command denied to user 'iredadmin'@'localhost' for table 'sessions'
* iRedAdmin has been successfully upgraded.
* Restarting uwsgi service to use new iRedAdmin release ...
Stopping uwsgi Fast, self-healing, application container se[  OK  ]
Starting uwsgi Fast, self-healing, application container server: [uWSGI] getting INI configuration from /etc/uwsgi.ini
                                                           [  OK  ]
* Upgrading completed.
<<< NOTE >>> If iRedAdmin doesn't work as expected, please post your issue in
<<< NOTE >>> our online support forum: http://www.iredmail.org/forum/

----

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

2 (edited by nazar-pc 2017-03-12 21:08:53)

Re: Upgrade iRedAdmin: CREATE command denied to user 'iredadmin'@'localho

This happened to me as well.
I've being upgrading from iRedAdmin 0.6.1 (which shipped with iRedMail 0.9.5-1).
I've then realized that there was a few more versions between 0.6.1 and 0.7.0.

Then I've tried to upgrade to 0.6.2 first and it also had error:

ERROR 1142 (42000) at line 1: CREATE command denied to user 'iredadmin'@'localhost' for table 'tracking'

Eventually I've added necessary tables via mysql console manually.

3

Re: Upgrade iRedAdmin: CREATE command denied to user 'iredadmin'@'localho

This issue was caused due to SQL user 'iredadmin' doesn't have 'CREATE' privilege.

We changed the mech in iRedAdmin upgrade script, and it requires file /root/.my.cnf instead, so that we can already have a sql user which has required privileges.

4

Re: Upgrade iRedAdmin: CREATE command denied to user 'iredadmin'@'localho

Do we need to change something in our setups at this point to fix issue in future?
My setup was initially 0.8.7 and upgraded to newer versions over time.

5

Re: Upgrade iRedAdmin: CREATE command denied to user 'iredadmin'@'localho

nazar-pc wrote:

Do we need to change something in our setups at this point to fix issue in future?

If you mean iRedAPD, then no.