A data source is your backend data repository. In this case we will be using MySQL to store the inventory item information. There are two parts to this. First is downloading the actual loopback connector for MySQL. Then, you will configure the connector properties for the MySQL database.
Create the MySQL Connector
-
In the API Connect Toolkit, select the
Data Sources
tab. -
Click on the
Add +
button, then give your new data source the nameinventory-items
and click on theNew
button: -
In the
Connector
drop down menu, selectMySQL
. -
Click on the
Install Connector
link to download the connector module for MySQL data sources. -
Wait for the connector installation to complete, then click on the
Close
button. -
Complete the connector configuration properties form with the following values:
URL: leave blank
Host:
demo.apicww.cloud
Port:
3306
User:
student
Password:
Passw0rd!
Database:
think
-
Click on the save icon to test connectivity to the MySQL data source.
Continue
Proceed to Create a Model for the Inventory Items