Creating MySQl Volume - app = "--datadir /data/mysql error

Im trying to deploy an app with a mysql volume by following this guide: Use a MySQL Database · Fly Docs

I’ve used the fly.toml presented on the page (for v2) and im seeing this error when trying to delpoy:

Error: failed loading app config from C:\Users\matth\Desktop\fly-laravel\fly.toml: toml: line 11 (last key ""): strings cannot contain newlines

I’ve copied the toml file like I say as follows:

app = "my-mysql"
kill_signal = "SIGINT"
kill_timeout = 5

# If copy/paste'ing, adjust this
# to the region you're deploying to
primary_region = "bos"

app = "--datadir /data/mysql 
  --default-authentication-plugin mysql_native_password 
  --innodb-buffer-pool-size 64M"


  MYSQL_DATABASE = "some_db"
  MYSQL_USER = "non_root_user"

# As of 04/25/2023:
# MySQL 8.0.33 has a bug in it
# so avoid that specific version
  image = "mysql:8.0.32"

Hi @Purple1—it looks like you found a bug in our docs (thanks for letting us know)! You could put the entire command on a single line, or use a multi-line string like this:

app = """--datadir /data/mysql \
  --default-authentication-plugin mysql_native_password \
  --performance-schema=OFF \
  --innodb-buffer-pool-size 64M"""

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.