I want to connect my wix webpage to an mySql database.
I just want to send one string from wix to my database.
The string is generated in js:
import wixData from 'wix-data';
wixData.query("Blog/Posts")
.find()
.then( (results) => {
let itemOne = results.items[0];
let itemTwo = results.items[1];
let blogOne = itemOne.title + ", " + itemOne.postPageUrl;
let blogTwo = itemTwo.title + ", " + itemTwo.postPageUrl;
let lastResult = [blogOne,blogTwo]; //export this string to my db
})
.catch( (err) => {
let errorMsg = err;
});
but the problem is, I have no idea how I can connect to mysql. There is an option to connect to an external db collection, but they ask for an endpoint url, which I never heard of while using mysql…
Can somebody please tell me how to get mysql to my data collections?