Connect to azure mysql

I want to use an external database for my nextcloud container instead of the internal db. I’ve changed the dbhost to my azure mysql, defined the user, pass and database name, but I can’t connect. Even if I deploy a new nexcloud container or just change the config file. Any toughts?

Nextcloud version (eg, 20.0.5): latest
Operating system and version (eg, Ubuntu 20.04): ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): docker
PHP version (eg, 7.4): docker

I found the problem. It was a server configuration in azure: --require_secure_transport=ON

I set to OFF and now it can connect. Any ideia how to secure transport in nextcloud?

To me it seems rather pointless if not dangerous to outsource the database to Azure. But regarding your problem I found this.

I want to see if that improves performance. I have a decent server, but wanted to try.

I think it would be better if the database is close to Nextcloud. Accessing the database via a remote network doesn’t make sense to me. Do you use Memory caching?

Maybe you can also achieve more with Ubuntu 22.04 LTS and updating the software such as PHP, MariaDB, Redis, …

I don’t use any cache, if it was not set by default. I understand that the db is far away but bd inside container is not very good also. I will try some cache later as well

It may be that caching is not activated by default. However, it is recommended in the tuning documentation.

Caching improves performance by storing data, code, and other objects in memory. Memory cache configuration for the Nextcloud server must be installed and configured