How-To Guides
Flows Guides
Work with SQL Databases
11min
you can use flows to make a connection with sql databases step 1 install mysql in litmus edge to install mysql in litmus edge navigate to applications > marketplace click marketplace list and select default marketplace catalog click the mysql tile the mysql configuration dialog box opens installation script version from the drop down list, select latest name enter a name for the application leave the other fields with their default values click launch navigate to applications > catalog apps to ensure the application is running successfully if you have any issues installing mysql, do the following check system > info to make sure that you have enough space on your edge device make sure that you do not have any network connectivity issues navigate to applications > catalog apps and click the mysql application tile to view the logs review any errors if you get the mysql error message error too many connections , refer to mysql error message too many connections docid\ oldqep9fccr0upig8biy step 2 create flow to create the flow in litmus edge, navigate to the flows manager and create a new flow see create a flow docid\ veyyte7xdcangglzbqya0 to learn more on the flow canvas, drag and connect an inject node, a template node, a mysql node, and a debug node configure mysql node you need to configure a database connection for the mysql node to configure the mysql node double click the mysql node the edit mysql node dialog box opens in the database field, click the edit icon configure the properties for the node host enter the ip address for your sql server it is 127 0 0 1 if your mysql instance is running on the same device as litmus edge port if needed, update the default port value 3306 user enter the user value from the mysql application configuration the default value is user password enter the password value from the mysql application configuration the default value is loopedge s3cr3t! database enter the database value from the mysql application configuration the default value is sample if needed, configure the remaining parameters click add , and then done configure template node to configure the template node double click the template node the edit template node dialog box opens property select msg and enter topic template enter below query into the form create table example ( id int not null auto increment primary key, name varchar(255) ); click done , and then deploy review flow payload to review the flow payload expand the message window beneath the flow and click the debug icon click the inject node button to run queries after writing them example queries review the following example queries create a table create table example ( id int not null auto increment primary key, name varchar(255) ); insert values insert into example (name) values ("jane"),("john"),("chris"); read the inserted values select from example; update inserted values update example set name = "christine" where name = "chris"; delete values delete from example where name = "christine";