5

I created a retail/POS desktop application with electron for my client, I used MySQL for database. Now I want to create a package for windows but the problem is that a user have to install MySQL server manually in his/her system to run the application. I'm looking for a solution that helps to bundle the MySQL server within the app setup/installer. I searched a lot but couldn't find any relevant solution. Is there any solution for this from your side? Thanks for future inputs.

Electron - ^12.0.2, electron-builder - ^22.10.5 | electron-packager - ^15.2.0

MySQL - 8.0, mysql2(driver) - ^2.2.5, ORM - Sequelize

Note:- I don't want to use solution like sqlite because it is not appropriate for this application.

user15557745
  • 139
  • 6
  • whats the reason ```sqlite``` doesn't fit in your app? – Medi Apr 15 '21 at 10:46
  • @Alexander because `sqlite` doesn't support RIGHT JOIN and FULL OUTER JOIN, we have to emulate them. – user15557745 Apr 15 '21 at 10:52
  • Are you using any type of ORM? – Medi Apr 15 '21 at 10:54
  • @Alexander, Yes `Sequelize` – user15557745 Apr 15 '21 at 10:55
  • 2
    You didn't ask this, but I'll say it anyway. Asking a retail customer to install and operate MySQL is a genuinely bad idea. Its installer is complex and can be error prone on smaller / older systems. It uses lots of RAM, which is also a problem on smaller / older systems. Unless you're paid hourly for support, you'll incur a lot of extra unpaid work if you do this. You'll be much better off fixing your SQL to work with sqlite and bundling that.(Plus, MySQL doesn't have FULL OUTER JOIN either.) – O. Jones Apr 15 '21 at 11:05
  • Please check @Michael's answer: [link](https://stackoverflow.com/questions/436345/when-or-why-would-you-use-a-right-outer-join-instead-of-left#:~:text=The%20only%20reason%20I%20can,rows%20in%20the%20independent%20side.) – Medi Apr 15 '21 at 11:13
  • @O.Jones Ya , I think so, I should switch to `SQLite`. – user15557745 Apr 15 '21 at 11:15
  • 1) If you bundle mysql into your application, you must have a commercial mysql licence or you need to distrubute your source code along with your application under GNU general public license. 2) mysql does not support full outer join either. Right joins can be written as left joins by reversing the order of the tables. – Shadow Apr 15 '21 at 12:05

0 Answers0