<p>My view on this would be it's risky because any environments for a project should ideally all match the same core versions of CMS, PHP version (at minimum same major version) and whatever database engine. If you use a different database engine on one environment compared to another you no longer have a consistent testing environment path e.g. development, staging, production.</p>
<p>While MariaDB is intended to be a &quot;drop in&quot; replacement, it isn't a 1:1 match, for example see: <a href="https://mariadb.com/kb/en/mariadb-vs-mysql-compatibility/" rel="nofollow noreferrer">https://mariadb.com/kb/en/mariadb-vs-mysql-compatibility/</a>. Whether or not any of these incompatibilities would be a problem for you, you'd have to review it.</p>
<p>You are also potentially opening up yourself for headaches with harder debugging if things don't work. For example, what if a DB query does not consistently return the expected result across both MariaDB and MySQL? What if it worked under MariaDB and then behaved differently under MySQL, granted in a lot of cases this probably wouldn't happen and possibly was more likely in older versions, but it's the same principle of even doing something like MySQL 5.7 on your development environment but then using MySQL 8.0 on production. You can't accurately test your app with confidence now, as there's a major version difference between the environments.</p>
<p>Stick to one consistent database engine and major version across all environments, otherwise you are potentially putting yourself in a position that could come back to bite you would be my take. As developers we deal with variables a lot. This is probably one variable you want as a constant no matter what.</p>

CC BY-SA 4.0
2022-06-24T07:19:43.593Z
Ok, thank you. I hope the Craft team could argue for these points. It's a bit tricky to take consideration of all these potential issues at the point of starting a new project. That's a shame that their Nitro tool isn't ready for the latest Mac: https://craftcms.com/docs/nitro/2.x/installation.html
Romain P.
CC BY-SA 4.0
2022-06-24T07:34:04.500Z
@RomainPoirier It might be worth highlighting that Nitro 3.x is in development. I haven't followed the development that closely to know if MySQL 8 is supported under 3.x for M1 Mac. Failing that you could ask the Nitro devs if MySQL 8 support has changed on the GitHub repo for clarification.
James White
CC BY-SA 4.0
2022-06-23T18:52:27.177Z
2022-06-23T18:58:53.070Z
2022-06-23T18:58:53.070Z
James White
<p>As from Jun 28 2022, Nitro is being discontinued:</p>
<ul>
<li><a href="https://craftcms.com/blog/retiring-craft-nitro" rel="nofollow noreferrer">https://craftcms.com/blog/retiring-craft-nitro</a></li>
<li><a href="https://craftcms.com/knowledge-base/migrating-from-craft-nitro-to-ddev" rel="nofollow noreferrer">https://craftcms.com/knowledge-base/migrating-from-craft-nitro-to-ddev</a></li>
</ul>
<p>The recommended alternative is <a href="https://ddev.com" rel="nofollow noreferrer">DDEV</a>, which support MySQL on Apple Silicon.</p>

CC BY-SA 4.0
2022-07-04T17:49:35.023Z
Yes, that was recently announced after your question, but at least helps you with your MariaDB/MySQL dilemma, you can now run MySQL without issues! However, the rationale of not mixing DB engines is still valid, regardless of what development environment used.
James White
CC BY-SA 4.0
2022-07-04T08:04:29.900Z
2022-07-04T08:04:29.900Z
Romain P.
<p>Nitro does not support MySQL for Apple Silicon, but you can use MariaDB interchangeably.</p>
<p>I'm using an Apple Silicon computer, and my server run with MySQL only.</p>
<p>However, as read in the <a href="https://craftcms.com/knowledge-base/craft-database-options-and-best-practices" rel="nofollow noreferrer">Craft Database Options and Best Practices</a>:</p>
<blockquote>
<p>(...) For each build, you should pick an engine and stick with it.
Moving from MySQL to PostgreSQL (or vice-versa) can be painful and
error-prone, and even finer differences between MySQL and MariaDB can
cause issues.</p>
</blockquote>
<p>How would it be risky to development under MariaDB and then go live with a MySQL setup?
What are these potential issues, and how to override them?</p>

<mysql><nitro><craft4><mariadb>
Nitro: how risky is it to dev using MariaDB and then go live with MySQL?
# Nitro: how risky is it to dev using MariaDB and then go live with MySQL?

(Asked by: username_0 on 2022-06-23)

Nitro does not support MySQL for Apple Silicon, but you can use MariaDB interchangeably.

I'm using an Apple Silicon computer, and my server run with MySQL only.

However, as read in the [Craft Database Options and Best Practices](https://craftcms.com/knowledge-base/craft-database-options-and-best-practices):

> (...) For each build, you should pick an engine and stick with it.
> Moving from MySQL to PostgreSQL (or vice-versa) can be painful and
> error-prone, and even finer differences between MySQL and MariaDB can
> cause issues.

How would it be risky to development under MariaDB and then go live with a MySQL setup?
What are these potential issues, and how to override them?

**Tags:** mysql, nitro, craft4, mariadb


---

## 2 answers

### Answer by username_1 on 2022-06-23. Score: 3

My view on this would be it's risky because any environments for a project should ideally all match the same core versions of CMS, PHP version (at minimum same major version) and whatever database engine. If you use a different database engine on one environment compared to another you no longer have a consistent testing environment path e.g. development, staging, production.

While MariaDB is intended to be a "drop in" replacement, it isn't a 1:1 match, for example see: <https://mariadb.com/kb/en/mariadb-vs-mysql-compatibility/>. Whether or not any of these incompatibilities would be a problem for you, you'd have to review it.

You are also potentially opening up yourself for headaches with harder debugging if things don't work. For example, what if a DB query does not consistently return the expected result across both MariaDB and MySQL? What if it worked under MariaDB and then behaved differently under MySQL, granted in a lot of cases this probably wouldn't happen and possibly was more likely in older versions, but it's the same principle of even doing something like MySQL 5.7 on your development environment but then using MySQL 8.0 on production. You can't accurately test your app with confidence now, as there's a major version difference between the environments.

Stick to one consistent database engine and major version across all environments, otherwise you are potentially putting yourself in a position that could come back to bite you would be my take. As developers we deal with variables a lot. This is probably one variable you want as a constant no matter what.

> **Comments:**
> **username_0**: Ok, thank you. I hope the Craft team could argue for these points. It's a bit tricky to take consideration of all these potential issues at the point of starting a new project. That's a shame that their Nitro tool isn't ready for the latest Mac: https://craftcms.com/docs/nitro/2.x/installation.html  
> **username_1**: @RomainPoirier It might be worth highlighting that Nitro 3.x is in development. I haven't followed the development that closely to know if MySQL 8 is supported under 3.x for M1 Mac. Failing that you could ask the Nitro devs if MySQL 8 support has changed on the GitHub repo for clarification.  

---

### Answer by username_0 on 2022-07-04. Score: 1

As from Jun 28 2022, Nitro is being discontinued:

* <https://craftcms.com/blog/retiring-craft-nitro>
* <https://craftcms.com/knowledge-base/migrating-from-craft-nitro-to-ddev>

The recommended alternative is [DDEV](https://ddev.com), which support MySQL on Apple Silicon.

> **Comments:**
> **username_1**: Yes, that was recently announced after your question, but at least helps you with your MariaDB/MySQL dilemma, you can now run MySQL without issues! However, the rationale of not mixing DB engines is still valid, regardless of what development environment used.  

---

