Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL connection validates fine but can't connect inside AI Agent node #12828

Open
uniring opened this issue Jan 24, 2025 · 1 comment
Open
Labels
in linear Issue or PR has been created in Linear for internal review

Comments

@uniring
Copy link

uniring commented Jan 24, 2025

Describe the problem/error/question

MySQL connection validates successfully when saving it, with the "Connection tested successfully" message. If I change the password or user it throws the correct error:

Couldn’t connect with these settings
Access denied for user 'xxxxxx'@'123.123.123.123' (using password: YES)

But when it validates successfully while saving the connection and all data is correct, if I use this connection inside an AI Agent using the "SQL Agent" agent type, it throws an error like the password is wrong. I've tried everything like outputting the password with JS, quoting it, backslashing some characters... Nothing works, and its curious because it really connects when I save the credentials in the connection, is only when the Agent tries to connect that it fails, looks like something is wrong with the agent.

I'm using SSL to connect but this seems to be working fine because if I change something in the certificates it throws an error and it's weird that MySQL can answer me with a readable error if the SSL was not working well, just to let you know.

What is the error message (if any)?

Access denied for user 'xxxxxx'@'123.123.123.123' (using password: YES)

Please share your workflow/screenshots/recording

{
  "nodes": [
    {
      "parameters": {
        "agent": "sqlAgent",
        "dataSource": "mysql",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.7,
      "position": [
        220,
        0
      ],
      "id": "6fa44c9a-46c2-41f1-999b-2b56bec6e073",
      "name": "AI Agent",
      "credentials": {
        "mySql": {
          "id": "hMrfbqJUPfLu96Wv",
          "name": "MySQL"
        }
      }
    }
  ],
  "connections": {
    "AI Agent": {
      "main": [
        []
      ]
    }
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "e8ad909803948c687446fd4993bca08c1018c7cafeaed461639b8a6802fee813"
  }
}

Share the output returned by the last node

Problem in node ‘AI Agent‘
Access denied for user 'xxxxxx'@'remote-ip' (using password: YES)

Debug info

core

  • n8nVersion: 1.76.1
  • platform: docker (self-hosted)
  • nodeJsVersion: 20.18.1
  • database: postgres
  • executionMode: queue
  • license: community (production)
@Joffcom
Copy link
Member

Joffcom commented Jan 24, 2025

Hey @uniring,

We have created an internal ticket to look into this which we will be tracking as "N8N-8225"

@Joffcom Joffcom added the in linear Issue or PR has been created in Linear for internal review label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in linear Issue or PR has been created in Linear for internal review
Projects
None yet
Development

No branches or pull requests

2 participants