romm icon indicating copy to clipboard operation
romm copied to clipboard

[Bug] Access denied for user 'romm-user'@'IP' (Using Password: yes)

Open prvsmrtsltppr7 opened this issue 1 year ago • 2 comments

RomM version latest

Describe the bug When loading docker, the container constantly restarts and this error appearing in the logs.

Expected behavior The web interface doesn't load as the container throws an error.

volumes:
  mysql_data:
  romm_resources:
  romm_redis_data:

services:
  romm:
    image: rommapp/romm:latest
    container_name: romm
    restart: unless-stopped
    environment:
      - DB_HOST=romm-db
      - DB_NAME=romm 
      - DB_USER=romm-user
      - DB_PASSWD= PW
      - ROMM_AUTH_SECRET_KEY= KEY
      - IGDB_CLIENT_ID= 
      - IGDB_CLIENT_SECRET= 
      - MOBYGAMES_API_KEY= KEY
      - STEAMGRIDDB_API_KEY 
    volumes:
      - romm_resources:/romm/resources 
      - romm_redis_data:/redis-data 
      - /home/games/library:/romm/library 
      - /home/games/assets:/romm/assets 
      - /home/games/config:/romm/config
    ports:
      - 80:8080
    depends_on:
      - romm-db

  romm-db:
    image: mariadb:latest
    container_name: romm-db
    restart: unless-stopped
    environment:
      - MYSQL_ROOT_PASSWORD= PW
      - MYSQL_DATABASE=romm
      - MYSQL_USER=romm-user
      - MYSQL_PASSWORD= PW
    volumes:
      - mysql_data:/var/lib/mysql

Desktop (please complete the following information):

Docker container running on Proxmox LXC

prvsmrtsltppr7 avatar Aug 04 '24 20:08 prvsmrtsltppr7

Romm can't login in your mariadb. Make sure both MYSQL_PASSWORD and DB_PASSWD match. Quote them just in case

zurdi15 avatar Aug 04 '24 21:08 zurdi15

Romm can't login in your mariadb. Make sure both MYSQL_PASSWORD and DB_PASSWD match. Quote them just in case

Yeah confirmed this, still getting the same error

prvsmrtsltppr7 avatar Aug 04 '24 21:08 prvsmrtsltppr7

Same issue here. Made sure to check the password and database, but everything's correct.

The IP address shown in the error also isn't my Unraid address, but the address MariaDB uses internally. Not sure if that plays a role.

basvroegop avatar Aug 16 '24 07:08 basvroegop

If you on unraid, we're working on updated install instructions. In the meantime you can try this:

Make it's own private network that contains both the romm and romm-db in the same network.
Or, use the ip address of the romm-db container instead of the host name.

gantoine avatar Aug 18 '24 14:08 gantoine

I'm a brand new user. I was having this exact same issue. Pulling my hair out. Confirming ten times over that I was using the same password in both places, but always seeing the 'access denied' error in the logs.

The fix was right there in the docker-compose file comment:

image: mariadb:latest # if you experience issues, try: linuxserver/mariadb:latest

To those of you searching and struggling with this in the future, adding "linuxserver/" fixed everything.

bmn001 avatar Aug 27 '24 03:08 bmn001

@bmn001 your my hero man. Been driving me nuts. I have been using Docker Compose so I can actually learn how this stuff works, eventually i'll switch to unraid apps cause its cool for the UI.

Thank you so much mine is working now :)

I was trying to make a .env just for this container or add it to my giant docker compose and its env file. I tried so many forms of the same password w/ quotes w/o and etc.

All it was was the image

Moonraka avatar Aug 28 '24 22:08 Moonraka

I hit this issue and couldn't escape it. Turns out I initially had no password, it didn't like that, and then every attempt to fix it was re-using the existing volume, and things were stuck in a bad state. What got me out of it was removing the relevant volumes (docker volume rm <all the romm volumes>)

greysonp avatar Jun 11 '25 20:06 greysonp

I cannot figure out what my problem is. Brand new installs of mariadb and romm on unraid. Passwords are the same, and image is linuxserver/mariadb:latest as @bmn001 had suggested.

sqlalchemy.exc.OperationalError: (mariadb.OperationalError) Access denied for user 'romm'@'romm.romm' (using password: YES) (Background on this error at: https://sqlalche.me/e/20/e3q8) ERROR: [RomM][init][2025-07-28 14:51:27] Failed to run database migrations INFO: [RomM][init][2025-07-28 14:51:27] Stopping valkey-server

TeKK39 avatar Jul 28 '25 19:07 TeKK39

I cannot figure out what my problem is. Brand new installs of mariadb and romm on unraid. Passwords are the same, and image is linuxserver/mariadb:latest as @bmn001 had suggested.

sqlalchemy.exc.OperationalError: (mariadb.OperationalError) Access denied for user 'romm'@'romm.romm' (using password: YES) (Background on this error at: https://sqlalche.me/e/20/e3q8) ERROR: [RomM][init][2025-07-28 14:51:27] Failed to run database migrations INFO: [RomM][init][2025-07-28 14:51:27] Stopping valkey-server

If you changd to Llnuxserver then you need to change the volume mount bind, it's not the same than official mariadb.

Your database is not being saved.

zurdi15 avatar Jul 28 '25 19:07 zurdi15

If you changd to Llnuxserver then you need to change the volume mount bind, it's not the same than official mariadb.

Your database is not being saved.

Is that the DB_Host name? if so i have also tried the ip address of the mariadb container

TeKK39 avatar Jul 28 '25 20:07 TeKK39

environment:
  - MYSQL_ROOT_PASSWORD= # Use a unique, secure password
  - MYSQL_DATABASE=romm
  - MYSQL_USER=romm-user
  - MYSQL_PASSWORD= 

Try these instead of mariadb

or try my new Unraid Docker Compose guide that isn't officially up yet, but will be soon.

https://github.com/Moonraka/docs/blob/unraid-compose-addon/docs/System-Setup/Unraid-Compose-Setup.md

Moonraka avatar Jul 28 '25 20:07 Moonraka

If you changd to Llnuxserver then you need to change the volume mount bind, it's not the same than official mariadb.

Your database is not being saved.

Is that the DB_Host name? if so i have also tried the ip address of the mariadb container

This part:

volumes:
      - mysql_data:/var/lib/mysql

Make sure it is the correct bind for the linuxserver image

zurdi15 avatar Jul 28 '25 20:07 zurdi15