Hi,
I have a problem to install Nextcloud 17 by using a remote database. Following scenario:
2 Systems installed with Debian 10, current updates.
Database Server [4.3.2.1]
- MariaDB - current version of Debian GNU/Linux 10
- There are 2 users root@localhost and dbadm@1.2.3.4
- Database is listening on non-standard port 5678
- The DBA was created with âCREATE USER âdbadmâ@â1.2.3.4â IDENTIFIED BY âfoobarâ;â
- The privileges were changed to âGRANT ALL PRIVILEGES ON *.* TO âdbadmâ@â1.2.3.4â IDENTIFIED BY PASSWORD â*abcdefâŚâ WITH GRANT OPTION;â
- The DBA is not using any plugin
WWW-Server [1.2.3.4]
- Apache 2 - current version of Debian GNU/Linux 10
- From this server the following works:
- telnet 4.3.2.1 5678
- mysql -h 4.3.2.1 -P 5678 -u dbadm -p
- mysql> CREATE DATABASE nextcloud;
- mysql> CREATE USER oc_admin IDENTIFIED BY âoc-foobarâ;
- mysql> GRANT ALL PRIVILEGES ON nextcloud.* TO âoc_adminâ@â%â;
But, itâs not possible to install nextcloud over the GUI or CLI. I got the following error message:
Error while trying to create admin user: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [1045] Access denied for user âoc_adminâ@â1.2.3.4â (using password: YES)
With the CLI:
su - www-data
cd /opt/nextcloud
./occ maintenance:install --database=mysql --database-name=nextcloud --database-host=4.3.2.1:5678 --database-user=dbadm --database-pass=foobar --admin-user=admin --admin-pass=oc-foobar
BTW: ââdatabase-host=4.3.2.1 --database-port=5678â doesnât work.
Whereâs my mistake?