Mysql - What are the possibilities?

Hi All,

I know that Mysql is not officially supported till now in Meteor. I have gathered some knowledge that using a package numtel:mysql we may get support for mysql

Now, my question is I have one Project build on LAMP Stack, I wanted to develop a new module for this in Meteor using the same Database (Mysql) as its contains existing records. I know that I have to do some workaround for SignIn and Authentication between two, That I have to take cake care too.

But I just wanted to know is this possible to use the existing system (Mysql Database) and what are the possibities of creating a new Module in Meteor, Can someone including Ben of numtel:mysql can put some light into this Senario.

and Also if someone can suggest me how to Single Signon between these two different Applications (LAMP and Meteor).

What are the steps that I should take in order to achieve this.


It’s not a normal step to take. Have you also considered alternatives as:

  • Supply a Rest API from the LAMP stack
  • Duplicate the data from MySQL into Mongo (maybe one way)

What you now create are 2 tightly coupled applications. That’s, in general, not seen as a very good solution.

If you want to go this path it might be good to first modularize the existing LAMP application so you have a good structure for inserting other platforms with clean APIs.

Hi Luc,

Thanks for your suggestions

API will not serve my purpose as here I need to fire a query to my exsiting DB and fetch some results and then do some work in Meteor and after that either store it back to Mysql (Mysql DB which is used in my existing App) or use new Mongo Collection and store documents there.

Duplication will not give me real time updates, I mean if I duplicate from Mysql to Mongo, the new updates in Mysql will not be reflected, the solution can running a cron and do it, but that is also not a real time feasible solution.

I am curios to know, if there is a possiblity of using the existing Mysql DB and then updating that DB with a new Meteor App. I want the same database should be shared between two Apps.

What do you think?.

Has Anyone used existing Mysql in Meteor App?, Can you please guide me.

Thanks a lot.


I’m not really sure what the question is. Connect to the same Mysql server using my package with Meteor and you’ll be able to access the same data. If your users login using the PHP app, it’s probably helpful to keep sessionids in the database so that you can validate the cookie coming from the Meteor app, assuming they’re both on the same domain. Otherwise, you’d probably have to port your accounts code from PHP to JavaScript in order to make a login form in the Meteor app.

Hi Ben,

Thanks for your reply. I have tried your Package and I am able to use it locally with some modifications in the mysql config file as it is required to be done in order to use it with meteor.

I mean binlog config:

binlog config

server-id = 1
binlog_format = row
log_bin = /var/log/mysql/mysql-bin.log
binlog_do_db = employees # optional
expire_logs_days = 10 # optional
max_binlog_size = 100M # optional

I have a question what if my hosting provider doesn’t allow this to be done. As you know my Existing App is running on the Shared Server.

Is there any alternative way around?


That’s a tough situation. While I do not recommend it, you may use a very early version of the package that relied upon triggers for updating the queries. Use this only if you do not already have triggers on the tables that you are querying. Be sure to read the documentation for this old version thoroughly as it does work a bit different.

Thanks for your suggestions, I appreciate your help.

Is there any way to use your package with ES6? I’m not able to import the class using meteor with Angular2