Hi, guys! I’m new to docker and tutor, and now I’m not able to run tutor, having an error with mysql, there is an issue on github seems similar but I can’t understand and don’t know how to fix this problem. Any suggestion would be appreciated. Thanks in advance.
Blockquote
ERROR 2003 (HY000): Can’t connect to MySQL server on ‘mysql’ (111)
[9/10] Waiting for MySQL service (this may take a while)…
Warning: Using a password on the command line interface can be insecure.
ERROR 2003 (HY000): Can’t connect to MySQL server on ‘mysql’ (111)
[10/10] Waiting for MySQL service (this may take a while)…
MySQL initialization error
Error: Command failed with status 1: docker-compose -f /root/.local/share/tutor/env/local/docker-compose.yml --project-name tutor_local run --rm mysql-client sh -e -c echo “Initializing MySQL…”
mysql_connection_max_attempts=10
mysql_connection_attempt=0
until mysql -u root --password=“6Wsx47s5” --host “mysql” --port 3306 -e ‘exit’
do
mysql_connection_attempt=$(expr $mysql_connection_attempt + 1)
echo " [$mysql_connection_attempt/$mysql_connection_max_attempts] Waiting for MySQL service (this may take a while)…"
if [ $mysql_connection_attempt -eq $mysql_connection_max_attempts ]
then
echo “MySQL initialization error” 1>&2
exit 1
fi
sleep 10
done
echo “MySQL is up and running”
mysql -u root --password=“6Wsx47s5” --host “mysql” --port 3306 -e ‘CREATE DATABASE IF NOT EXISTS openedx;’
mysql -u root --password=“6Wsx47s5” --host “mysql” --port 3306 -e ‘GRANT ALL ON openedx.* TO “openedx”@“%” IDENTIFIED BY “24JZvrDY”;’
And another question, it’s working in dev mode, how to create superuser in development environment ? The command in the document is not working. Still mysql issue.