Issue on loading data using JDBC data source
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2023 09:01 AM
I have installed mid server and mySQL database in docker in 2 deferent container,
when I am tryin to connect the data base using data source from servicenow I am getting bellow error :
MID Server reported error: SQLState: null
java.sql.SQLException: java.sql.SQLNonTransientConnectionException: Could not connect to address=(host=127.0.0.1)(port=3306)(type=master) : Connection refused (Connection refused).
below is my data source configuration:
I am able to connect the database and execute mySQL query from VS Code using below connection:
Please help me on establishing the connection if anyone have worked on this.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2023 05:01 AM
I'm not a Docker specialist, but my understanding is that Docker allows you to route ports to the host machine. This seems to be your approach for attempting to access the database from Visual Studio Code. Instead of using 127.0.0.1, you might want to consider using the IP address of the host machine. While I can't guarantee its success, it's worth a try.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2023 08:19 AM
I think I tried that as well. let me try it again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2023 08:04 AM
Amitra,
Did you solve this issue?I have a similar problem (version UTAH)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2023 11:51 PM
Hi tantoy,
Not yet. I tried with my network IP address as well. But no luck. what about you.
Thanks & Regards,
Amitra Bhunia
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2023 05:54 AM
When I got the same error I was connecting to a remote database hosted on linux server in our company network which was behind company firewall. Our system engineer told me the firewall rules need to be in place for opening the port 3306 to MID server or Servicenow domain. I am not sure the rules relate to Servicenow host or to MID Server host. Since MID host sits in the same network it may be for Servicenow host or both(?). Once firewall issue was solved, I had to have a remote database user(<username>@<MID server hostname or IP> in my MariaDB database in order to datasource on Servicenow to be able to import data
Where is your database hosted? 127.0.0.1 is local host. That makes sense in VS but does not make sense in Servicenow. I think the first place you have to change is the Data Source Data Base 'Server' to IP or hostname of your remote database.