I was following this tutorial on how to set up a mySQL database, but for some reason the app doesn’t start whatever I do. I have run the following commands:
mkdir mysql_fly
cd mysql_fly
flyctl launch
flyctl volumes create mysqldata --size 1
flyctl secrets set MYSQL_PASSWORD=epicpassword MYSQL_ROOT_PASSWORD=epicpassword
flyctl deploy
And the fly.yml
file looks like this:
app = "appname"
kill_signal = "SIGINT"
kill_timeout = 5
processes = []
[mounts]
source="mysqldata"
destination="/data"
[env]
MYSQL_DATABASE = "database_name"
MYSQL_USER = "root"
[build]
image = "mysql:8"
[experimental]
cmd = [
"--default-authentication-plugin",
"mysql_native_password",
"--datadir",
"/data/mysql",
"--performance-schema=OFF"
]
I am not sure what am I doing wrong here, but in the logs I just get this repeated three times before the app dies:
2023-01-19T17:00:20.800 runner[061bb749] den [info] Starting instance
2023-01-19T17:00:21.386 runner[061bb749] den [info] Configuring virtual machine
2023-01-19T17:00:21.387 runner[061bb749] den [info] Pulling container image
2023-01-19T17:00:21.802 runner[061bb749] den [info] Unpacking image
2023-01-19T17:00:21.810 runner[061bb749] den [info] Preparing kernel init
2023-01-19T17:00:21.950 runner[061bb749] den [info] Setting up volume 'mysqldata'
2023-01-19T17:00:21.953 runner[061bb749] den [info] Opening encrypted volume
2023-01-19T17:00:22.111 runner[061bb749] den [info] Configuring firecracker
2023-01-19T17:00:22.169 runner[061bb749] den [info] Starting virtual machine
2023-01-19T17:00:22.416 app[061bb749] den [info] Starting init (commit: b8364bb)...
2023-01-19T17:00:22.445 app[061bb749] den [info] Mounting /dev/vdc at /data w/ uid: 0, gid: 0 and chmod 0755
2023-01-19T17:00:22.450 app[061bb749] den [info] Preparing to run: `docker-entrypoint.sh --default-authentication-plugin mysql_native_password --datadir /data/mysql --performance-schema=OFF` as root
2023-01-19T17:00:22.472 app[061bb749] den [info] 2023/01/19 17:00:22 listening on [fdaa:1:27e7:a7b:d828:4:2d83:2]:22 (DNS: [fdaa::3]:53)
2023-01-19T17:00:22.514 app[061bb749] den [info] 2023-01-19 17:00:22+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.32-1.el8 started.
2023-01-19T17:00:22.928 app[061bb749] den [info] 2023-01-19 17:00:22+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2023-01-19T17:00:22.949 app[061bb749] den [info] 2023-01-19 17:00:22+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.32-1.el8 started.
2023-01-19T17:00:23.464 app[061bb749] den [info] Starting clean up.
2023-01-19T17:00:23.465 app[061bb749] den [info] Umounting /dev/vdc from /data
What could be causing this?