- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to call an external database mySQL on Magento 2 ?
Hi Community !
Since one month I try to know Magento 2 and now I would like to call an external database whose contains Magento attributes. I need this connexion because after I would like to make ui-component with grid and to integrate a graphic, so I need some tips to use the best practices of Magento 2.
Thank's for your help,
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: How to call an external database mySQL on Magento 2 ?
Hi @Juliette_
Here you have multiple options to connect the external database - I assume that external database is also connected with some system, so that system might have API available so by using API and setting the cron jobs on specific periodic time you can fetch the attribute data from that external database.
Another approach would be import/export based integration where in you can do CSV export from that database and import it in the Magento for the same.
Also you can try with the direct database integration meaning by running certain queries directly insert the attributes data into your Magento database. - but this is still not recommended as Magento have EAV database structure so.
So which one gives you more ease you can go with that approach.
Hope it helps !