guessi / docker-yourls

Dockerize YOURLS service (Shorten URL Service)
https://hub.docker.com/r/guessi/docker-yourls/
27 stars 16 forks source link

Erro connect DB #3

Closed adrianodss closed 2 years ago

adrianodss commented 2 years ago

Thanks for providing the yml.

Get this result by doing docker composer. I made all changes to env.mysql and env.yourls

YOURLS: Your Own URL Shortener YOURLS Fatal error

Incorrect DB config, or could not connect to DB PDOException: SQLSTATE[HY000] [1045] Access denied for user 'yourls'@'172.31.0.3' (using password: YES)

Powered by YOURLS v 1.8.2

guessi commented 2 years ago

Hi @adrianodss thanks for trying my quick start kit for YOURLS.

After reviewing your message, I tried to launch a brand new YOURLS with the following command docker-compose up -d once again on my side, but everything works fine. Could you please re-verify your env setup again?

Some basic troubleshooting guide for you:

Limitations of the env files:

If the issue still exist, please try to describe more about how you configure the env files (what value you changed?), how you bring up containers (via docker-compose?) and the tool/platform version (version of docker? docker-compose?), thanks!

NOTES: Be sure to redact any sensitive information if you are going to post command output here at GitHub issue.

adrianodss commented 2 years ago

Hi @adrianodss thanks for trying my quick start kit for YOURLS.

After reviewing your message, I tried to launch a brand new YOURLS with the following command docker-compose up -d once again on my side, but everything works fine. Could you please re-verify your env setup again?

Some basic troubleshooting guide for you:

  • docker version # what docker version you are running with?
  • docker-compose version # what docker-compose version you are running with?
  • docker image ls # is the container images being downloaded as expected?
  • docker container ls # is the container for MySQL service still running?
  • git diff # verify all lines you have changed (kindly note that there are some limitation of the env files, listed as follow).

Limitations of the env files:

  • The value of YOURLS_DB_PASS inside env.yourls should be exactly the same as MYSQL_PASSWORD in env.mysql
  • The value of YOURLS_DB_USER inside env.yourls should be exactly the same as MYSQL_USER in `env.mysql.
  • All variables should not contain = (equal sign), (space), # (number sign).

If the issue still exist, please try to describe more about how you configure the env files (what value you changed?), how you bring up containers (via docker-compose?) and the tool/platform version (version of docker? docker-compose?), thanks!

NOTES: Be sure to redact any sensitive information if you are going to post command output here at GitHub issue.

Thanks for listening!

It really was a problem with the mysql password characters!

guessi commented 2 years ago

Hi @adrianodss thanks for update, I will put that into FAQ section afterward.