Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image ftgo-application-mysql init sql error #181

Open
tianzhen45 opened this issue Jan 3, 2024 · 0 comments
Open

Image ftgo-application-mysql init sql error #181

tianzhen45 opened this issue Jan 3, 2024 · 0 comments

Comments

@tianzhen45
Copy link

In container ftgo-application-mysql
/docker-entrypoint-initdb.d/0.configure-root-user.sh

#! /bin/bash

if [ -z "$MYSQL_ROOT_HOST" ] ; then
  MYSQL_ROOT_HOST=%
  echo defaulting MYSQL_ROOT_HOST=$MYSQL_ROOT_HOST
fi

cat >> /docker-entrypoint-initdb.d/5.configure-users.sql <<END
CREATE USER 'root'@'${MYSQL_ROOT_HOST}' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}';
GRANT ALL ON *.* TO 'root'@'${MYSQL_ROOT_HOST}' WITH GRANT OPTION ;
GRANT PROXY ON ''@'' TO 'root'@'${MYSQL_ROOT_HOST}' WITH GRANT OPTION ;"
END
...

GRANT PROXY ON ''@'' TO 'root'@'${MYSQL_ROOT_HOST}' WITH GRANT OPTION ;"

The line has an extra double quotation .

There is log error.

2024-01-03 16:37:13 mysql-1          | [Entrypoint] running /docker-entrypoint-initdb.d/5.configure-users.sql
2024-01-03 16:37:13 mysql-1          | ERROR 1064 (42000) at line 3: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"' at line 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant