Enabling MySQL 4-byte support - access denied

Hello

I use Ubuntu 16.04 and installed Nextcloud manually. In the backend I get the following message:

MySQL is used as database but does not support 4-byte characters. To be able to handle 4-byte characters (like emojis) without issues in filenames or comments for example it is recommended to enable the 4-byte support in MySQL. For further details read the documentation page about this.

So I checked the manual:
https://docs.nextcloud.com/server/16/go.php?to=admin-mysql-utf8mb4

One of the first steps is:

If your innodb_file_format is set as ‘Antelope’ you must upgrade your file format using:

mysql> SET GLOBAL innodb_file_format=Barracuda;

But I get this error:
ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER privilege(s) for this operation

There is also a note in the manual for this step:

On some shared hosts, you may not have the permissions to upgrade the InnoDB file format, meaning you are unable to use utf8mb4

Ok, but I have this problem and have no shared host, so what now?

edit:
**I use MariaDB

I forgot to write, that I use MariaDB, Note:**

All mysql statements have to be executed as privileged database user. (Using “normal” nextcloud database user will result in empty query sets due to missing privileges for INFORMATION_SCHEMA database.)

https://docs.nextcloud.com/server/16/admin_manual/configuration_database/mysql_4byte_support.html#mariadb-support

Did you log in the mysql as root user?

If that’s not helping try.

mysql> GRANT SUPER ON *.* TO 'user'@'localhost' IDENTIFIED BY 'password';
mysql> FLUSH PRIVILEGES;
1 Like

If you do have SSH access, which you seem to have judging by your post, I would suggest adding the following to your MySQL config at /etc/mysql/my.cnf and restarting your MySQL server afterwards.

[mysqld]
innodb_large_prefix=true
innodb_file_format=barracuda
innodb_file_per_table=1

This way there is no way for the server to forget about these parameters for any reason and you can continue with the guide.

1 Like

Thanks for the answers.

Sorry, I forgot to write that I use the MariaDB and have also overlooked the note:

All mysql statements have to be executed as privileged database user. (Using “normal” nextcloud database user will result in empty query sets due to missing privileges for INFORMATION_SCHEMA database.)