Connect to my cloud maria db in docker custom app and lms app

Subject:
Access Denied for User When Connecting from Docker Container to SkySQL MariaDB

Body:
Hello everyone,

I’m running a Frappe site inside a Docker container and trying to connect to a SkySQL (MariaDB) database. I’ve confirmed that my direct connection from the host machine works, but Frappe inside the container fails with the following error:

MySQLdb.OperationalError: (1045, "Access denied for user 'dbpgf00142362'@'' (using password: YES)")

Here’s what I’ve done so far:

  • Database credentials and connection settings are correct in site_config.json:
    {
      "db_name": "kabeer",
      "db_host": "serverless-us-east4.sysp0000.db2.skysql.com",
      "db_port": 4027,
      "db_user": "dbpgf00142362",
      "db_password": "mypass",
      "db_type": "mariadb",
      "sslmode": "required"
    }
    
  • Debug output from Frappe confirms the correct host, user, and password are being used:
    Connection settings: {
      'user': 'dbpgf00142362',
      'database': 'kabeer',
      'host': 'serverless-us-east4.sysp0000.db2.skysql.com',
      'port': 4027,
      'password':'mypass'
    }
    
  • I’ve granted privileges to the user for all IPs (temporarily for testing):
    GRANT ALL PRIVILEGES ON kabeer.* TO 'dbpgf00142362'@'%';
    FLUSH PRIVILEGES;
    
  • The container’s public IP is whitelisted in the SkySQL dashboard.
  • Manual MySQL connection from inside the container with the same credentials works.

Despite all this, Frappe inside the Docker container still fails with “Access denied”.

Question:
What else could be causing this issue? Are there any additional settings or logs I should check? Has anyone faced a similar problem with Frappe and SkySQL/MariaDB in Docker? , i also tried to update the db connection inside the frappe container with real db but no luck

Thank you for your help!