Installer not using Remote Database Host

Hi Nextcloud Community,

at the moment I am trying to Install Nextcloud using a remote Database Server.

But the Installer keeps ignoring my --database-host option… It just keeps using localhost. Why ?

sudo -u www-data php occ maintenance:install --database=“mysql” --database-host="…notlocalhost" --database-name=“nextcloud” --database-user=“nextcloud” --database-pass="…"
[…]
Error while trying to create admin user: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [1045] Access denied for user ‘nextcloud’@’…localhost’ (using password: YES)

Do I miss something ?

Any help would be appreciated!

Thanks!
Andrew

Do I need a local Database when using a remote Database ?

can you connect to the remote database server? so can you connect from your ‘nextcloud’ server to the remote mysql server? it says access denied. does the remote database server had a database-user nextcloud?

Thank you for replying. And for giving me input.

It was just a matter of setting the remote login permissions on the remote server.

So for every fellow database newbie: :slight_smile:
GRANT ALL PRIVILEGES ON nextcloud. TO ‘nextcloud’@’%’ IDENTIFIED BY ‘password’*

% Being the Wildcard to allow remote Access…

Lessons learned: Databases are picky with access rights… :smiley:

2 Likes

Glad it works now! :+1: