I was following this tutorial on deploying a MySQL database. Despite following the steps carefully, I encountered the following error. I’m unsure how to resolve it and would appreciate any guidance or suggestions to troubleshoot and fix the issue.
2024-05-22T17:19:57.088 app[3d8d993df90e08] qro [info] 2024-05-22T17:19:57.088227Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2024-05-22T17:19:57.092 app[3d8d993df90e08] qro [info] 2024-05-22T17:19:57.091692Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2024-05-22T17:19:57.092 app[3d8d993df90e08] qro [info] 2024-05-22T17:19:57.092386Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-05-22T17:19:57.092 app[3d8d993df90e08] qro [info] 2024-05-22T17:19:57.092607Z 0 [ERROR] [MY-013129] [Server] A message intended for a client cannot be sent there as no client-session is attached. Therefore, we're sending the information to the error-log instead: MY-001146 - Table 'mysql.component' doesn't exist
2024-05-22T17:19:57.092 app[3d8d993df90e08] qro [info] 2024-05-22T17:19:57.092696Z 0 [Warning] [MY-013129] [Server] A message intended for a client cannot be sent there as no client-session is attached. Therefore, we're sending the information to the error-log instead: MY-003543 - The mysql.component table is missing or has an incorrect definition.
2024-05-22T17:19:57.092 app[3d8d993df90e08] qro [info] 2024-05-22T17:19:57.092820Z 0 [ERROR] [MY-000068] [Server] unknown option '--default-authentication-plugin'.
2024-05-22T17:19:57.093 app[3d8d993df90e08] qro [info] 2024-05-22T17:19:57.093486Z 0 [ERROR] [MY-010119] [Server] Aborting
2024-05-22T17:19:58.599 app[3d8d993df90e08] qro [info] 2024-05-22T17:19:58.599651Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.4.0) MySQL Community Server - GPL.
2024-05-22T17:19:58.599 app[3d8d993df90e08] qro [info] 2024-05-22T17:19:58.599747Z 0 [System] [MY-015016] [Server] MySQL Server - end.
2024-05-22T17:19:59.439 app[3d8d993df90e08] qro [info] INFO Main child exited normally with code: 1
2024-05-22T17:19:59.451 app[3d8d993df90e08] qro [info] INFO Starting clean up.
2024-05-22T17:19:59.452 app[3d8d993df90e08] qro [info] INFO Umounting /dev/vdb from /data
2024-05-22T17:19:59.453 app[3d8d993df90e08] qro [info] [ 4.374277] reboot: Restarting system
2024-05-22T17:19:59.677 runner[3d8d993df90e08] qro [info] machine did not have a restart policy, defaulting to restart
2024-05-22T17:20:05.671 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:05.671416110 [01HYGN13B9SYFKRE4A4FAFBA3R:main] Running Firecracker v1.7.0
2024-05-22T17:20:05.792 app[3d8d993df90e08] qro [info] [ 0.058878] PCI: Fatal: No config space access function found
2024-05-22T17:20:06.054 app[3d8d993df90e08] qro [info] INFO Starting init (commit: d772ddd9)...
2024-05-22T17:20:06.082 app[3d8d993df90e08] qro [info] INFO Mounting /dev/vdb at /data w/ uid: 0, gid: 0 and chmod 0755
2024-05-22T17:20:06.085 app[3d8d993df90e08] qro [info] INFO Resized /data to 1069547520 bytes
2024-05-22T17:20:06.086 app[3d8d993df90e08] qro [info] INFO Preparing to run: `docker-entrypoint.sh --datadir /data/mysql --default-authentication-plugin mysql_native_password` as root
2024-05-22T17:20:06.094 app[3d8d993df90e08] qro [info] INFO [fly api proxy] listening at /.fly/api
2024-05-22T17:20:06.097 app[3d8d993df90e08] qro [info] 2024/05/22 17:20:06 INFO SSH listening listen_address=[fdaa:9:493f:a7b:d6:7edd:b844:2]:22 dns_server=[fdaa::3]:53
2024-05-22T17:20:06.114 runner[3d8d993df90e08] qro [info] Machine started in 512ms
2024-05-22T17:20:06.127 app[3d8d993df90e08] qro [info] 2024-05-22 17:20:06+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.4.0-1.el9 started.
2024-05-22T17:20:06.512 app[3d8d993df90e08] qro [info] 2024-05-22 17:20:06+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2024-05-22T17:20:06.530 app[3d8d993df90e08] qro [info] 2024-05-22 17:20:06+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.4.0-1.el9 started.
2024-05-22T17:20:06.730 app[3d8d993df90e08] qro [info] '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
2024-05-22T17:20:07.095 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:06.741209Z 0 [System] [MY-015015] [Server] MySQL Server - start.
2024-05-22T17:20:07.095 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:07.091749Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.4.0) starting as process 314
2024-05-22T17:20:07.106 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:07.106691Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2024-05-22T17:20:07.515 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:07.514552Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2024-05-22T17:20:07.645 app[3d8d993df90e08] qro [info] mysqld: Table 'mysql.plugin' doesn't exist
2024-05-22T17:20:07.645 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:07.645237Z 0 [ERROR] [MY-010735] [Server] Could not open the mysql.plugin table. Please perform the MySQL upgrade procedure.
2024-05-22T17:20:07.645 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:07.645607Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-05-22T17:20:07.646 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:07.645886Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-05-22T17:20:07.646 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:07.646129Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-05-22T17:20:07.647 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:07.647144Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-05-22T17:20:07.647 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:07.647348Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-05-22T17:20:07.647 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:07.647588Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-05-22T17:20:07.647 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:07.647773Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-05-22T17:20:07.696 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:07.696733Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2024-05-22T17:20:07.712 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:07.712810Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2024-05-22T17:20:07.721 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:07.720870Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2024-05-22T17:20:07.721 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:07.720925Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2024-05-22T17:20:07.724 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:07.724420Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2024-05-22T17:20:07.725 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:07.724999Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-05-22T17:20:07.725 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:07.725266Z 0 [ERROR] [MY-013129] [Server] A message intended for a client cannot be sent there as no client-session is attached. Therefore, we're sending the information to the error-log instead: MY-001146 - Table 'mysql.component' doesn't exist
2024-05-22T17:20:07.725 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:07.725358Z 0 [Warning] [MY-013129] [Server] A message intended for a client cannot be sent there as no client-session is attached. Therefore, we're sending the information to the error-log instead: MY-003543 - The mysql.component table is missing or has an incorrect definition.
2024-05-22T17:20:07.725 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:07.725497Z 0 [ERROR] [MY-000068] [Server] unknown option '--default-authentication-plugin'.
2024-05-22T17:20:07.726 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:07.726131Z 0 [ERROR] [MY-010119] [Server] Aborting
2024-05-22T17:20:09.236 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:09.236045Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.4.0) MySQL Community Server - GPL.
2024-05-22T17:20:09.236 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:09.236123Z 0 [System] [MY-015016] [Server] MySQL Server - end.
2024-05-22T17:20:10.100 app[3d8d993df90e08] qro [info] INFO Main child exited normally with code: 1
2024-05-22T17:20:10.112 app[3d8d993df90e08] qro [info] INFO Starting clean up.
2024-05-22T17:20:10.113 app[3d8d993df90e08] qro [info] INFO Umounting /dev/vdb from /data
2024-05-22T17:20:10.114 app[3d8d993df90e08] qro [info] [ 4.378277] reboot: Restarting system
2024-05-22T17:20:10.332 runner[3d8d993df90e08] qro [info] machine did not have a restart policy, defaulting to restart
2024-05-22T17:20:15.414 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:15.414853217 [01HYGN13B9SYFKRE4A4FAFBA3R:main] Running Firecracker v1.7.0
2024-05-22T17:20:15.532 app[3d8d993df90e08] qro [info] [ 0.058397] PCI: Fatal: No config space access function found
2024-05-22T17:20:15.790 app[3d8d993df90e08] qro [info] INFO Starting init (commit: d772ddd9)...
2024-05-22T17:20:15.818 app[3d8d993df90e08] qro [info] INFO Mounting /dev/vdb at /data w/ uid: 0, gid: 0 and chmod 0755
2024-05-22T17:20:15.821 app[3d8d993df90e08] qro [info] INFO Resized /data to 1069547520 bytes
2024-05-22T17:20:15.822 app[3d8d993df90e08] qro [info] INFO Preparing to run: `docker-entrypoint.sh --datadir /data/mysql --default-authentication-plugin mysql_native_password` as root
2024-05-22T17:20:15.830 app[3d8d993df90e08] qro [info] INFO [fly api proxy] listening at /.fly/api
2024-05-22T17:20:15.833 app[3d8d993df90e08] qro [info] 2024/05/22 17:20:15 INFO SSH listening listen_address=[fdaa:9:493f:a7b:d6:7edd:b844:2]:22 dns_server=[fdaa::3]:53
2024-05-22T17:20:15.861 runner[3d8d993df90e08] qro [info] Machine started in 516ms
2024-05-22T17:20:15.868 app[3d8d993df90e08] qro [info] 2024-05-22 17:20:15+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.4.0-1.el9 started.
2024-05-22T17:20:16.248 app[3d8d993df90e08] qro [info] 2024-05-22 17:20:16+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2024-05-22T17:20:16.266 app[3d8d993df90e08] qro [info] 2024-05-22 17:20:16+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.4.0-1.el9 started.
2024-05-22T17:20:16.454 app[3d8d993df90e08] qro [info] '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
2024-05-22T17:20:16.816 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:16.464665Z 0 [System] [MY-015015] [Server] MySQL Server - start.
2024-05-22T17:20:16.816 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:16.812589Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.4.0) starting as process 314
2024-05-22T17:20:16.828 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:16.827931Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2024-05-22T17:20:17.238 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:17.237139Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2024-05-22T17:20:17.373 app[3d8d993df90e08] qro [info] mysqld: Table 'mysql.plugin' doesn't exist
2024-05-22T17:20:17.373 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:17.372775Z 0 [ERROR] [MY-010735] [Server] Could not open the mysql.plugin table. Please perform the MySQL upgrade procedure.
2024-05-22T17:20:17.373 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:17.373136Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-05-22T17:20:17.373 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:17.373372Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-05-22T17:20:17.373 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:17.373574Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-05-22T17:20:17.374 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:17.374543Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-05-22T17:20:17.375 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:17.374953Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-05-22T17:20:17.375 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:17.375154Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-05-22T17:20:17.375 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:17.375332Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-05-22T17:20:17.423 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:17.423126Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2024-05-22T17:20:17.439 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:17.439092Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2024-05-22T17:20:17.447 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:17.447217Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2024-05-22T17:20:17.447 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:17.447292Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2024-05-22T17:20:17.451 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:17.450538Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2024-05-22T17:20:17.451 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:17.451135Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-05-22T17:20:17.451 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:17.451349Z 0 [ERROR] [MY-013129] [Server] A message intended for a client cannot be sent there as no client-session is attached. Therefore, we're sending the information to the error-log instead: MY-001146 - Table 'mysql.component' doesn't exist
2024-05-22T17:20:17.451 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:17.451432Z 0 [Warning] [MY-013129] [Server] A message intended for a client cannot be sent there as no client-session is attached. Therefore, we're sending the information to the error-log instead: MY-003543 - The mysql.component table is missing or has an incorrect definition.
2024-05-22T17:20:17.451 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:17.451565Z 0 [ERROR] [MY-000068] [Server] unknown option '--default-authentication-plugin'.
2024-05-22T17:20:17.452 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:17.452150Z 0 [ERROR] [MY-010119] [Server] Aborting
2024-05-22T17:20:18.962 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:18.962636Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.4.0) MySQL Community Server - GPL.
2024-05-22T17:20:18.962 app[3d8d993df90e08] qro [info] 2024-05-22T17:20:18.962717Z 0 [System] [MY-015016] [Server] MySQL Server - end.
2024-05-22T17:20:19.835 app[3d8d993df90e08] qro [info] INFO Main child exited normally with code: 1
2024-05-22T17:20:19.847 app[3d8d993df90e08] qro [info] INFO Starting clean up.
2024-05-22T17:20:19.849 app[3d8d993df90e08] qro [info] INFO Umounting /dev/vdb from /data
2024-05-22T17:20:19.850 app[3d8d993df90e08] qro [info] [ 4.373468] reboot: Restarting system
2024-05-22T17:20:20.063 runner[3d8d993df90e08] qro [info] machine did not have a restart policy, defaulting to restart
This is my fly.toml
file:
app = 'fly-mysql-database'
primary_region = 'qro'
[build]
image = 'mysql:8'
[[vm]]
cpu_kind = 'shared'
cpus = 1
memory_mb = 2048
[processes]
app = """--datadir /data/mysql \
--default-authentication-plugin mysql_native_password"""
[mounts]
source = "mysqldata"
destination = "/data"
[env]
MYSQL_DATABASE = "dbname"
MYSQL_USER = "dbuser"
I also did:
fly secrets set MYSQL_PASSWORD=supersecret MYSQL_ROOT_PASSWORD=superdupersecret
Any ideas?