How to upgrade Forge MySQL 5.7 to MariaDB 10.2
So found myself in an interesting situation.
I have a local development environment in which I work on my project. I recently had to upgrade to MariaDB 10.2 from MySQL 5.7 for various reasons but namely due to the JSON sql field and some others.
So locally, I had to upgrade my database and all that. It's a drop in replacement so it works great.
The thing is, I'm unsure how to configure this with Laravel Forge. My Forge deployment is currently running MySQL 5.7, and once I commit my feature to the master branch, it will automatically deploy the code into my Forge deployment which is hosted on a Digital Ocean Linux server.
I can sign into the console through Digital Ocean and install MariaDB from scratch, but I'm unsure how to make it use that over the previous MySQL version, I'm also unsure how to upgrade the mysql database into the MariaDB 10.2 version.
I briefly emailed Forge support and they mentioned I should provision a new server, but that would mean I would lose my current database, and then I would have to go through the hurdle of backing it up, converting it locally, and uploading it after the provision. But what is a better way?
Currently I think one non-intuitive way would be to
- Backup my database on the Forge deployment
- Delete the server.
- Provision a fresh server with the MariaDB.
- Locally convert the backed up database to be MariaDB 10.2 compatible.
- Upload the backup into the Forge database.
- Done.
Anyone know if there's a better way?
Thank you so much!
Please or to participate in this conversation.