For partners that build or integrate commercially available applications and service solutions with the Oracle Cloud Platform
For partners that provide implementation or managed services around Oracle Cloud Applications
Hi,
Is there any way to conenct any third party database like mysql, oracle in MCS ?
For eg. we can conenct JDBC connection in java same as I want to conenct any third party database in MCS.
Comment
Hi,
Oracle MCS provides connectors for only SOAP and REST based interfaces instead of native JDBC based connectors.
However MCS lets you implement API using NodeJS which can be exposed through a Mobile blackened.
Through this approach you can connect to any backend third party database like MySQL by utilizing node modules such as
https://github.com/mysqljs/mysql
Hope that helps.
Average Rating:



1 rating
|
Sign in to rate this
There is one caveat to Arun's info. MCS is usually running in an Oracle Managed environment. As a result, accessing ports other than 80 and 443 is restricted. To reach a MySQL server running on its native 3306 port, you would need to add port forwarding from port 80 to 3306. Alternatively, you could create a REST service layer that acts as an intermediary between port 80 and port 3306, essentially REST-enabling the database.
I would bet it is possible to configure MySQL to listen to port 80, though I've never heard of it being done.
- Jeff
Average Rating:



1 rating
|
Sign in to rate this
With OMCe you absolutely can. You will need a pure javascript (i.e. no native code) library for the database you are trying to access. For MySQL you can use https://github.com/mysqljs/mysql.
Just download and unzip your custom API scaffold from OMCe, then use npm to install and add the database library to your package.json dependencies.
for example:
{
"name": "accounts",
"version": "1.0.0",
"description": "Accounts",
"main": "accounts.js",
"oracleMobile": {
"dependencies": {
"apis": {},
"connectors": {}
}
},
"dependencies": {
"bluebird": "^3.5.1",
"mysql": "^2.15.0"
}
}
Then follow the instructions in your database library's documentation on how to make database queries from your own node.js api implementation code.
Remember to include your node_modules directory in the zip file you deploy to OMCe. Our Custom Code Test Tools available from bit.ly/omcedownloads will help you test and deploy your custom code locally from the command line.
Regards
Martin
Oracle Mobile & Bots Product Management
Average Rating:



2 ratings
|
Sign in to rate this