Installation fails because connection string may not be right

Hi Everyone,

I am trying to get Nextcloud up and running on Microsoft Azure by following the installation guide on Installation on Linux — Nextcloud 13 Administration Manual 13 documentation.

Special situation: I want the database to be outside of my webserver and to be a Microsoft Azure Managed MySQL instance. This worked fine for me in many other projects. It usually works like any other personal setup mysql database.

I have set up

  • an Ubuntu 16.04.5 LTS as OS
  • Apache2 as Webserver
  • Installed packages are:
    • apache2
    • libapache2-mod-php7.0
    • php7.0-gd
    • php7.0-json
    • php7.0-mysql
    • php7.0-curl
    • php7.0-mbstring
    • php7.0-intl
    • php7.0-mcrypt
    • php-imagick
    • php7.0-xml
    • php7.0-zip
  • Apache config in /etc/apache2/sites-available/nextcloud.conf looks like:
Alias /nextcloud "/var/www/nextcloud/"

<Directory /var/www/nextcloud/>
  Options +FollowSymlinks
  AllowOverride All

 <IfModule mod_dav.c>
  Dav off
 </IfModule>

 Satisfy Any

 SetEnv HOME /var/www/nextcloud
 SetEnv HTTP_HOME /var/www/nextcloud

</Directory>
  • Syslink is created with
sudo ln -s /etc/apache2/sites-available/nextcloud.conf /etc/apache2/sites-enabled/nextcloud.conf
  • Apache is configed like:
sudo a2enmod rewrite
sudo a2enmod headers
sudo a2enmod env
sudo a2enmod dir
sudo a2enmod mime

sudo service apache2 restart

sudo a2enmod ssl
sudo a2ensite default-ssl
sudo service apache2 reload
  • Nextcloud was installed with
wget https://download.nextcloud.com/server/releases/nextcloud-13.0.5.tar.bz2
  • Extracted and copied into /var/www/nextcloud
  • Giving access rights with
sudo chown -R www-data:www-data /var/www/nextcloud/
  • Accessing the Installation Wizard and filling out the data ends in:
    image
  • I have provided the following information:
    • Administrator: <myAdminName (all lowercase letters)>
    • Administrator-password: <MyPassword (lowercase, upercase, special chars, numbers)>
    • DataDirectory : /opt/nextcloud
    • Database adminstraor: <myAdminName (all lowercase letters)>
      NOTE that Microsoft Azure depicts the username as <myAdminName>@<hostname> e.g. dbadmin@my-db
    • Password: <MyPassword (lowercase, upercase, special chars, numbers)>
    • Database: nextcloud
    • Host: <hostname (all lowercase concated with "-")>.mysql.database.azure.com:3306
  • I have disabeld SSL enforcement in the Azure MySQL databse, as this seems to have caused other issues as well
  • Connecting to MySQL database from inside the nextcloud webser with mysql -h <hostname> -u <username> -p works absolutley flawless.

Can you help me get nextcloud up and running with being connected to the Azure MySQL database?

Any thoughts on the error during the installation?

Best,
erosinger

Update:
It seems as if the Azure Managed MySQL database is missing permissions to perform actions during the installation. The users are created in the database which is fine:

host user
% oc_nextcloudadm1
% oc_nextcloudadm2
% oc_nextcloudadm3
% oc_nextcloudadm4
% oc_nextcloudadm5
% oc_nextcloudadm6
% oc_nextcloudadm7
% oc_nextcloudadm8
% oc_nextcloudadm9
% oc_nextcloudadmi
… …
localhost oc_nextcloudadm1
localhost oc_nextcloudadm2
localhost oc_nextcloudadm3
localhost oc_nextcloudadm4
localhost oc_nextcloudadm5
localhost oc_nextcloudadm6
localhost oc_nextcloudadm7
localhost oc_nextcloudadm8
localhost oc_nextcloudadm9
localhost oc_nextcloudadmi

But it seems they are missing privileges to do something e.g. create tables.
The nextcloud database is still empty after the failed installation.

mysql> use nextcloud;
Database changed
mysql> show tables;
Empty set (0.04 sec)

Any thoughts on how to proceed?