To install MySQL, you will be prompted to include the MySQL service on install. You simply just need to select it.

When you install MySQL, Spin will set up a dedicated "MySQL" service for you with persistent volumes so you do not lose data when updating your container.
The database uses the official MySQL image. The default configuration allows us to:
environment: variables in the docker-compose.*.yml files)Since the database is running in a container, you will need to connect to the database using the container name. For example, if you have a Laravel application, you would use the following in your .env file:
DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=laraveluser
DB_PASSWORD=laravelpassword
From your development workstation, we expose the database service on port 3306. This is the default port for MySQL and MariaDB. This means you can use localhost and 3306 to connect to the database.
When you run spin up, the MySQL container will create our database and start the MySQL service.