Update to MySQL 8 #37912
Nextcloud 21 requires at least MySQL 8, so that's a reason to eventually have a look.
Update process:
Add to /etc/apt/sources.list.d/mysql.list:
deb http://repo.mysql.com/apt/ubuntu/ bionic mysql-apt-config
deb http://repo.mysql.com/apt/ubuntu/ bionic mysql-8.0
deb http://repo.mysql.com/apt/ubuntu/ bionic mysql-tools
#deb http://repo.mysql.com/apt/ubuntu/ bionic mysql-tools-preview
deb-src http://repo.mysql.com/apt/ubuntu/ bionic mysql-8.0
Add key with apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8C718D3B5072E1F5
Then apt update
and apt install mysql-server
.
Maybe a fix is required for missing directory, then do ln -s /usr/share/mysql-8.0 /usr/share/mysql
The file /etc/mysql/mysql.conf.d/mysqld.cnf
needs an update:
diff --git a/mysql/mysql.conf.d/mysqld.cnf b/mysql/mysql.conf.d/mysqld.cnf
index 7bf5529..654a495 100644
--- a/mysql/mysql.conf.d/mysqld.cnf
+++ b/mysql/mysql.conf.d/mysqld.cnf
@@ -54,12 +54,12 @@ thread_cache_size = 8
# the first time they are touched
myisam-recover-options = BACKUP
max_connections = 100
-internal_tmp_disk_storage_engine = InnoDB
+#internal_tmp_disk_storage_engine = InnoDB
#
# * Query Cache Configuration
#
-query_cache_limit = 1M
-query_cache_size = 64M
+#query_cache_limit = 1M
+#query_cache_size = 64M
#
# * Logging and Replication
#
@@ -80,7 +80,7 @@ log_error = /var/log/mysql/error.log
# other settings you may need to change.
#server-id = 1
#log_bin = /var/log/mysql/mysql-bin.log
-expire_logs_days = 10
+#expire_logs_days = 10
max_binlog_size = 100M
#binlog_do_db = include_database_name
#binlog_ignore_db = include_database_name
Maybe those variables need to be replaced with other.