I have a web based project which I wrote with NodeJS. I moved the project to my Raspberry Pi which runs on Raspbian Stretch. The project has a lot of lines of code which deal with MySQL connections. However, when I installed MySQL on Stretch, I got MariaDB. It is not possible for me to convert every line of MySQl related code to use MariaDB. Due to that, I need MySQL as it used to get installed on previous Debian versions (like Jesse).

How do I install MySQL instead of MariaDB ? On a few forums I read that I need to build it from the source code. Is there another way? And if not, then can someone guide me on building it from the source code?

1 Answer 1


MariaDB is a drop-in replacement for MySQL and should be mostly compatible to it. Unless you need a very specific feature of MySQL, MariaDB should work just fine.

For more details about the compatibility of MySQL and MariaDB see the following two links:

If you really need MySQL, they provide an apt repository for mysql binaries. Here is a short summary of the necessary steps:

  • Add repository via install package or manually
  • Install and configure mysql as needed

For more information see https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.