problem after upgrade from 6.15.2 to 7.13.7
Asked by Miodrag Vlahovi?:

Hello,

So, we did the upgrade of Confluence from version 6.15.2 to 7.13.7 according to documentation with installer. After the upgrade we can't access our confluence instance anymore. We are using CentOS7 with MySQL version 5.7.38.

Instead of seeing login screen we are getting this error:

Upgrade failed. Please consult the system logs for details. You will need to fix these problems, restore your database and confluence home directory to the pre upgrade state. Then retry the upgrade. Upgrade error message: Upgrade task com.atlassian.confluence.upgrade.upgradetask.DenormalisedSpacePermissionsUpgradeTask@475dfaba failed during the SCHEMA_UPGRADE phase due to: StatementCallback; bad SQL grammar \[DROP PROCEDURE IF EXISTS space_permission_procedure_for_denormalised_permissions;\]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: alter routine command denied to user 'user'@'localhost' for routine 'confluencedb.space_permission_procedure_for_denormalised_permissions'

We have checked the grants on the database and the user has all grants on confluence database.

Can You help us resolve this issue, what could be the problem? We will provide any other info which could help solving this problem.

Regards!


Answers:
author: Fabio Racobaldo _Herzum_
body: Hi [@Miodrag Vlahovi?](/t5/user/viewprofilepage/user-id/4963897) ,

welcome to the Atlassian community!

Please, could you specify the DBMS used by your Confluence? Are u sure that that DBMS is a supported one as specified in this article <https://confluence.atlassian.com/conf713/supported-platforms-1077914838.html> ?

Fabio

comments: author: Miodrag Vlahovi?
body: Hi [@Fabio Racobaldo _Herzum_](/t5/user/viewprofilepage/user-id/781528)

By DBMS you mean which database we use? As I specified in the first post, we are using mysql 5.7.38, and mysql 5.7 has a green check so i think we are good here.

I have to say, we migrated from mariadb to mysql due to mariadb being unsupported, but after database migration the confluence was running normally (we could see the login page without the error). Everything was fine until the upgrade of confluence to new LTS version.

Regards!


author: Fabio Racobaldo _Herzum_
body: Sorry [@Miodrag Vlahovi?](/t5/user/viewprofilepage/user-id/4963897) , I missed that information.

It seems an issue at grants level.

Please try :

    GRANT ALL ON *.* TO 'user'@'localhost' IDENTIFIED BY 'YOUR_USER_PWD_HERE';FLUSH PRIVILEGES;

Please let me know if you already performed this check.

Fabio


author: Miodrag Vlahovi?
body: We did this steps already but on the confluence database only, here is the output:

```
mysql> grant all privileges on confluencedb.* to 'user'@'localhost' identified by 'xxxxxxxxxxx';
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> show grants for 'user'@'localhost'
-> ;
+--------------------------------------------------------------------+
| Grants for user@localhost |
+--------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'user'@'localhost' |
| GRANT ALL PRIVILEGES ON `confluencedb`.* TO 'user'@'localhost' |
+--------------------------------------------------------------------+
2 rows in set (0.00 sec)
```

Still no luck after that. Do You think it is necessary to grant all privileges on all databases?

Regards!


author: Fabio Racobaldo _Herzum_
body: I don't think that you need to grant all privileges to all database.

Please try to follow this guide <https://confluence.atlassian.com/confkb/install-upgrade-confluence-7-11+-fails-with-error-you-do-not-have-the-super-privilege-and-binary-logging-is-enabled-1044096915.html>


author: Miodrag Vlahovi?
body: We have that option already in our configuration:

```
[root@confluence etc]# cat /etc/my.cnf
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html

[mysqld]
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
#
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
max_allowed_packet=512M
innodb_log_file_size=2GB

transaction-isolation=READ-COMMITTED
binlog_format=row
log-bin-trust-function-creators = 1

#optimizer_switch = derived_merge=off

log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
```

Any other suggestions?

Regards!


author: Fabio Racobaldo _Herzum_
body: It seems that your configuration is wrong :

```
log-bin-trust-function-creators = 1
```

should be

    log_bin_trust_function_creators = 1 ?

Please try to change it, restart mysql service and then confluence.


author: Miodrag Vlahovi?
body: Yes, thank You! I can't believe I made a typo like that.

After making the change and restarting mysqld and confluence we are back on login.

Thank You again!

Regards!


author: Fabio Racobaldo _Herzum_
body: You're welcome [@Miodrag Vlahovi?](/t5/user/viewprofilepage/user-id/4963897) . Please mark my answer as accepted ;)


Tags: confluence-server

database

server

upgrade