Enhancement #2779

SOGo: suppress DROP USER error message

Added by Davide Principi about 7 years ago. Updated over 6 years ago.

Status:CLOSEDStart date:
Priority:LowDue date:
Assignee:-% Done:

100%

Category:nethserver-sogo
Target version:v6.6
Resolution: NEEDINFO:No

Description

The nethserver-sogo-update event logs the following line, if the MySQL sogo user (still) does not exist:

Jun 18 12:38:26 mynsrv esmith::event[10967]: ERROR 1396 (HY000) at line 1: Operation DROP USER failed for 'sogo'@'localhost'

We should get rid of that annoying message.


Related issues

Related to NethServer 6 - Feature #2748: Upgrade SOGO to 2.2.15 CLOSED

Associated revisions

Revision 97cef467
Added by Stefano Fancello almost 7 years ago

Instead of dropping database user 'sogo' and recreating it, use only GRANT, that create user only if it's needed. Refs #2779

History

#1 Updated by Giacomo Sanchietti about 7 years ago

In SQL code, you can use something like this:

GRANT ALL ON myuser.* TO mydb@localhost  IDENTIFIED BY 'mypass';
FLUSH PRIVILEGES;

#2 Updated by Davide Principi about 7 years ago

  • Status changed from NEW to TRIAGED
  • Target version set to v6.5
  • % Done changed from 0 to 20

#3 Updated by Giacomo Sanchietti almost 7 years ago

#4 Updated by Giacomo Sanchietti almost 7 years ago

  • Priority changed from Normal to Low

#5 Updated by Stefano Fancello almost 7 years ago

  • Status changed from TRIAGED to ON_DEV
  • Assignee set to Stefano Fancello
  • % Done changed from 20 to 30

#6 Updated by Stefano Fancello almost 7 years ago

  • Status changed from ON_DEV to MODIFIED
  • % Done changed from 30 to 60

nethserver-sogo commit 97cef467e27ae318c7e165394414c145b7ef0772

#7 Updated by Stefano Fancello almost 7 years ago

install SOGo on a clean system, or if you are lazy and SOGo is already installed, launch

 # mysql -e "DROP USER 'sogo'@'localhost'" 
 # signal-event nethserver-sogo-update

and verify that there isn't this error in /var/log/messages:

esmith::event[9828]: ERROR 1396 (HY000) at line 1: Operation DROP USER failed for 'sogo'@'localhost'

#8 Updated by Giacomo Sanchietti over 6 years ago

  • Assignee deleted (Stefano Fancello)

#9 Updated by Giacomo Sanchietti over 6 years ago

  • Target version changed from v6.5 to v6.6-rc1

#10 Updated by Stefano Fancello over 6 years ago

  • Status changed from MODIFIED to ON_QA
  • % Done changed from 60 to 70

repository nethserver-testing nethserver-sogo-1.4.0-8.0gitb09d4c7a.ns6.noarch.rpm

#11 Updated by Giacomo Sanchietti over 6 years ago

  • Target version changed from v6.6-rc1 to v6.6

#12 Updated by Alessio Fattorini over 6 years ago

  • Status changed from ON_QA to VERIFIED
  • % Done changed from 70 to 90

No error in /var/log/messages
Verified

#13 Updated by Giacomo Sanchietti over 6 years ago

  • Status changed from VERIFIED to CLOSED
  • % Done changed from 90 to 100
Released in nethserver-base:
  • nethserver-sogo-1.5.0-1.ns6.noarch.rpm

Also available in: Atom PDF