<p>Should be:</p>
<ol>
<li>From the terminal run <code>nitro stop</code>.</li>
<li>From Docker Desktop, click on Containers/Apps.</li>
<li>Find the MySQL 5.7 container and click the trash icon to remove it.</li>
<li>From the terminal, run <code>nitro edit</code>.</li>
<li>Under databases, you should see something like:</li>
</ol>
<pre><code>engine: mysql
version: &quot;5.7&quot;
port: &quot;3306&quot;
</code></pre>
<ol start="6">
<li>Change <code>&quot;5.7&quot;</code> to <code>&quot;8.0&quot;</code>.</li>
<li>Save the changes.</li>
<li>From the terminal, run <code>nitro apply</code>.</li>
</ol>

CC BY-SA 4.0
2021-06-28T15:45:30.643Z
Yeah, actually that worked for me, thank you!!! First I backed up my DB, and I did that you wrote and it works perfectly. I owe you one!!
EdisonJS
CC BY-SA 4.0
2021-06-25T23:40:34.060Z
2021-06-25T23:40:34.060Z
Brad Bell
<p>I usually use Nitro and docker to run Craft.</p>
<p>Nitro created a Docker container with MySQL 5.7.  How can I change that version to MySQL 8?</p>

CC BY-SA 4.0
2021-06-25T03:19:14.760Z
Do you want to _add_ MySQL 8, so you're running both 5.7 and 8.0? Or do you want to replace MySQL 5.7 with MySQL 8.0?
Brad Bell
CC BY-SA 4.0
2021-06-25T17:02:35.897Z
Hi, I want to replace MySQL 5.7 with MySQL 8 in Nitro!
EdisonJS
CC BY-SA 4.0
2021-10-18T19:13:46.177Z
@BradBell, I'm looking to have 2 different versions for 2 different servers, what would be the method to add another MySQL server on another version?
mateostabio
<database><mysql><mariadb>
How do you change from MySQL 5.7 to MySQL 8 in Nitro on MacOS
# How do you change from MySQL 5.7 to MySQL 8 in Nitro on MacOS

(Asked by: username_0 on 2021-06-24)

I usually use Nitro and docker to run Craft.

Nitro created a Docker container with MySQL 5.7. How can I change that version to MySQL 8?

**Tags:** database, mysql, mariadb
> **Comments:**
> **username_1**: Do you want to _add_ MySQL 8, so you're running both 5.7 and 8.0? Or do you want to replace MySQL 5.7 with MySQL 8.0?  
> **username_0**: Hi, I want to replace MySQL 5.7 with MySQL 8 in Nitro!  
> **username_2**: @BradBell, I'm looking to have 2 different versions for 2 different servers, what would be the method to add another MySQL server on another version?  

---

## 1 answers

### Answer by username_1 on 2021-06-25. Score: 2 | Accepted answer

Should be:

From the terminal run nitro stop.
From Docker Desktop, click on Containers/Apps.
Find the MySQL 5.7 container and click the trash icon to remove it.
From the terminal, run nitro edit.
Under databases, you should see something like:

engine: mysql
version: "5.7"
port: "3306"


Change "5.7" to "8.0".
Save the changes.
From the terminal, run nitro apply.

> **Comments:**
> **username_0**: Yeah, actually that worked for me, thank you!!! First I backed up my DB, and I did that you wrote and it works perfectly. I owe you one!!  

---

