Connect to Database Server besides Gateway Connections

I was wondering, is it possible to connect to a database server, in my case MySql, using script or ignition designer property without defining the connection in the gateway connections?

You can connect to a database by setting it up as a datasource via scripting:

I would hazard a guess that this would not work in an Edge gateway as there are restrictions edge's database connections

3 Likes

Well this is the exact thing i was looking for, but it is the half solution, can we also remove the data source that was added via scripting?

Oh yes we can.

system.db.removeDatasource(name)
2 Likes