'Pimcore Database Installation on a Different Server

I have just started using Pimcore and deployed its a mysql database on another server. During its installation, it couldn't connect to the database. I created the database yml file using this link https://pimcore.com/docs/5.x/Development_Documentation/Getting_Started/Advanced_Installation_Topics.html for the configuration and still does not work. It only works when the database is on the same server as pimcore. The error it gave when I do a remote connection is this:An exception occurred in driver: SQLSTATE[HY000] [1045] Access denied for user 'SSL_USER'@'x.x.x.x' (using password: YES).

The yml file I created looks like this:

 parameters:
    database_credentials:
        user:                 SSL_USER
        password:             password
        dbname:               project_database

        # env variables can be directly read with the %env() syntax
        # see https://symfony.com/blog/new-in-symfony-3-2-runtime-environment-variables
        host:                 x.x.x.x (Ip address of db server)
        port:                 3306


Solution 1:[1]

Please take a look, you are using 'SSL' reserved word in your username.

Just use another username.

Please see the list of reserved words here: https://dev.mysql.com/doc/refman/8.0/en/keywords.html

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Eugene Kaurov