[GH-ISSUE #4256] [BUG]: Agent Can't Find Active Tables in MySQL Database on Windows #2712

Closed
opened 2026-02-22 18:30:54 -05:00 by yindo · 2 comments
Owner

Originally created by @saxenapritesh on GitHub (Aug 7, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4256

Originally assigned to: @shatfield4 on GitHub.

How are you running AnythingLLM?

Cloned from Github Repo.

What happened?

After setting up the SQL Connector (MySQL) in AnythingLLM, the agent confirms that the database is connected and even displays the connected database name. However, when attempting to list the tables or retrieve related data, the agent fails to find any tables only on Windows systems.

This issue does not occur on Linux — the same setup works perfectly and lists all database tables and data correctly.

Are there known steps to reproduce?

  1. Open a new AnythingLLM workspace (http://localhost:3000/)
  2. Go to the "SQL Connector"
  3. Toggle the connector On and configure a MySQL database connection
  4. Set the Server endpoint to the MySQL container IP (e.g., 127.0.0.1)
  5. Save the settings and return to the chat interface
  6. Ask the agent: "List all tables in the database"
  7. The agent fails to retrieve any tables or data (screenshot attached)
Image

Expected Behavior:

The agent should list all tables in the connected MySQL database.

Actual Behavior:

On Windows, the agent does not list any tables even though the connection is successful.

On Linux, the exact same setup works correctly.

Environment:

  • Model: LLaMA 3:70B
  • OS: Windows (Issue present) / Linux (Working)
  • AnythingLLM Version: [1.8.4]
  • Connector Type: SQL Connector (MySQL)
Originally created by @saxenapritesh on GitHub (Aug 7, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4256 Originally assigned to: @shatfield4 on GitHub. ### How are you running AnythingLLM? Cloned from Github Repo. ### What happened? After setting up the SQL Connector (MySQL) in AnythingLLM, the agent confirms that the database is connected and even displays the connected database name. However, when attempting to list the tables or retrieve related data, the agent fails to find any tables **only on Windows systems**. This issue does **not** occur on Linux — the same setup works perfectly and lists all database tables and data correctly. ### Are there known steps to reproduce? 1. Open a new AnythingLLM workspace (`http://localhost:3000/`) 2. Go to the **"SQL Connector"** 3. Toggle the connector **On** and configure a MySQL database connection 4. Set the **Server endpoint** to the MySQL container IP (e.g., `127.0.0.1`) 5. Save the settings and return to the chat interface 6. Ask the agent: *"List all tables in the database"* 7. The agent fails to retrieve any tables or data (screenshot attached) <img width="1236" height="253" alt="Image" src="https://github.com/user-attachments/assets/c62e9d92-808f-4394-a5f5-3ffff07d5eb6" /> ### **Expected Behavior:** The agent should list all tables in the connected MySQL database. ### **Actual Behavior:** On **Windows**, the agent does not list any tables even though the connection is successful. On **Linux**, the exact same setup works correctly. ### **Environment:** * **Model**: LLaMA 3:70B * **OS**: Windows (Issue present) / Linux (Working) * **AnythingLLM Version**: \[1.8.4] * **Connector Type**: SQL Connector (MySQL)
yindo added the possible bugneeds info / can't replicateinvestigating labels 2026-02-22 18:30:54 -05:00
yindo closed this issue 2026-02-22 18:30:54 -05:00
Author
Owner

@timothycarambat commented on GitHub (Aug 8, 2025):

Given the tool works on Linux (consistently?) but not on Windows it appears the connection was not set up correct?
https://github.com/Mintplex-Labs/anything-llm/blob/1ee9750f9ea452a55eaa30a2e196ce5b8a1b6a6d/server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/MySQL.js#L63-L65

Will get the database_id from the input field on the frontend / connection string
https://github.com/Mintplex-Labs/anything-llm/blob/1ee9750f9ea452a55eaa30a2e196ce5b8a1b6a6d/server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/MySQL.js#L20

So if that is undefined I wonder how it saved on the frontend?

@timothycarambat commented on GitHub (Aug 8, 2025): Given the tool works on Linux (consistently?) but not on Windows it appears the connection was not set up correct? https://github.com/Mintplex-Labs/anything-llm/blob/1ee9750f9ea452a55eaa30a2e196ce5b8a1b6a6d/server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/MySQL.js#L63-L65 Will get the database_id from the input field on the frontend / connection string https://github.com/Mintplex-Labs/anything-llm/blob/1ee9750f9ea452a55eaa30a2e196ce5b8a1b6a6d/server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/MySQL.js#L20 So if that is undefined I wonder how it saved on the frontend?
Author
Owner

@shatfield4 commented on GitHub (Aug 8, 2025):

If you test this with another model like an OpenAI model or Anthropic model this may fix your issue. We tend to see issues like this with local models where it is just sending incorrect parameters to the functions under the hood due to local models hallucinating.

I can see that the logs in your screenshot are saying Running SQL: SELECT table_name from ... 'undefined'. Where it says undefined, this is either an LLM hallucination or you did not set the database/table name correctly in the SQL agent setup.

@shatfield4 commented on GitHub (Aug 8, 2025): If you test this with another model like an OpenAI model or Anthropic model this may fix your issue. We tend to see issues like this with local models where it is just sending incorrect parameters to the functions under the hood due to local models hallucinating. I can see that the logs in your screenshot are saying `Running SQL: SELECT table_name from ... 'undefined'`. Where it says undefined, this is either an LLM hallucination or you did not set the database/table name correctly in the SQL agent setup.
yindo changed title from [BUG]: Agent Can't Find Active Tables in MySQL Database on Windows to [GH-ISSUE #4256] [BUG]: Agent Can't Find Active Tables in MySQL Database on Windows 2026-06-05 14:48:05 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#2712