Question

Can I install both MongoDB and MySql on the same server instance?

Posted February 3, 2015 14k views

I have a single server with Linux, Nginx, MySql, and PHP currently installed. It works great and I have no problems with that stack, but I’m interested in putting a NodeJS app that will use MongoDB on the same server with it. I know I’d have to install NodeJS and MongoDB in order to do this, but I’m curious if this is even possible? And if it is possible, should I do it? For reference, none of the sites on my server are doing anything really intense. All of the MySql-driven sites are WordPress, and this new NodeJS site would be a simple CMS type of site. Thanks!

1 comment
  • Good morning, thanks for the help. However, I would like to ask a question. Is it possible to have mongodb and sqlexpress on the same server?
    Do you have any experience?

    Thanks
    Bruno Silva

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Yes, you can. They system doesn’t care if you have 1, 2, or a hundred database servers. It just cares that you don’t try to run more than one on a port (3306 for MySQL, for example).

You can even run 2 or more instances of MySQL on the same server – one per port.