Having issues with authentication

Describe the issue/error/question

Issues when using docker secrets Access denied for user (using password: YES)
But when I specify the password as a env variable

If I add command: cat /run/secrets/mysqln8n the container will output the password to the console

I’ve also tried DB_MYSQLDB_PASSWORD_FILE and DB_MYSQLDB_PASSWORD both do the same

What is the error message (if any)?

Initializing n8n process
There was an error initializing DB: “Access denied for user ‘n8n’@‘’ (using password: YES)”

Information on your n8n setup

  • n8n version: Latest from Docker hub
  • Database you’re using (default: SQLite): MySQL
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: Docker

Hey @jonny190,

Welcome to the community :raised_hands:

I have seen that error a bunch over the years and it tends to mean either the password is wrong or the user is not allowed to login from that IP. When you made the user did you do create user 'n8n'@'' or something else?

You can double check the allowed locations with something like SELECT user,host FROM mysql.user;

I have the same issue when setting docker secrets access.
Any news please?

Hey @wam,

Can you open a new post and complete the template provided? If you are seeing the exact same error message as the one in this post it will likely be down to the database not wanting to allow the user access.