New Setup of owncloud server 10.5 with php 7.4 mysql server 8.0.22

I need a complete new install of my unbuntu server, because I did a release upgrade from 18.04 to 20.04.
Upgrade crashed mysql server and I’m not able to install new because of old dependencies.

Now I need to start from scratch. What I coudn’t find out in owncloud documentation is, if owncloud can connect to mysql 8.0.22 with new SHA2 authentication? With PHP7.3 it was not possible, is it possible with PHP7.4?
CREATE USER ‘occlouduser’@‘localhost’ IDENTIFIED BY ‘myocuserpassword’; is that okay or do I have to go llike this?
sudo nano /etc/mysql/my.cnf
ADD this
[mysqld]
default-authentication-plugin=mysql_native_password

login mysql and
CREATE USER ‘occlouduser’@‘localhost’ IDENTIFIED WITH mysql_native_password BY ‘myocuserpassword’;
That makes it poosible for user to login with SHA1 Authentication.

Does anyone know?

Do you mean this? https://dev.mysql.com/doc/mysql-security-excerpt/8.0/en/caching-sha2-pluggable-authentication.html

I’m not aware that this is possible, perhaps @jvillafanez knows more?

1 Like

As far as I know, the DB user used by ownCloud is created during the installation (from the web UI), and it’s created in a CREATE USER '$name'@'localhost' IDENTIFIED BY '$password' flavour.

I think you can use the SHA2 authentication if it’s set as the default authentication mechanism.

Note that for the initial setup (from the web UI), I think it’s recommended to use the DB root user and let ownCloud create its DB user and grant the required permissions for the tables. ownCloud will use the “restricted” user.
Command line setup might work differently.

Also note that it “should” work, but it hasn’t been tested. ownCloud has automated tests using “mysql:8.0” docker image, with whatever default setup it has, if you want to have a look. It might not be for production-use though.

1 Like

What made me stumble is the following quote from the link I posted:

1 Like