Roundcube installation when using MySQL 5.7 fails because of missing privileges

tomputer

Verified User
Joined
Apr 5, 2016
Messages
48
Location
The Netherlands
When installing Roundcube with custombuild a da_roundcube mysql user is created with specific privileges. In MySQL 5.7 a new privilege was added (REFERENCES) which is now required by the initial roundcube database insert.

This is the relevant part in the build script.
Code:
mysql --defaults-extra-file=${DA_MY_CNF} -e "GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,LOCK TABLES,INDEX ON ${ROUNDCUBE_DB}.* TO '${ROUNDCUBE_DB_USER}'@'${MYSQL_ACCESS_HOST}' IDENTIFIED BY '${ROUNDCUBE_DB_PASS}';" --host=${MYSQLHOST} 2>&1

When installing Roundcube you will get the following error.

Code:
ERROR 1142 (42000) at line 37 in file: 'SQL/mysql.initial.sql': REFERENCES command denied to user 'da_roundcube'@'localhost' for table 'users'

To fix this the REFERENCES privilege should be added to the GRANT in the build script when using MySQL 5.7 (or alternatively use GRANT ALL so that it works on every version).
 
Back
Top