Overhang.io

Tutor local start can't work, mysql issue

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.

Hi @teruun! There might be some trouble related to your mysql initialization. Please stop everything, delete the mysql data folder and quickstart again:

tutor local stop
sudo rm -rf $(tutor config printroot)/data/mysql
tutor local quickstart

Hi, thanks for your reply, it helps and that error is gone, but something occurs when doing some mongodb migration. Maybe I should reset my whole enviorenment and try again. I installed tutor with pip -e command, does that have any difference with the binary compiled version?

You most probably had an issue during initialization. Just delete the mongodb data folder and try again.