Closed ktfth closed 2 years ago
There are a few issues with this project so at the moment there are additional steps that might be needed.
What version of OpenCart are you using this on?
3.0.3.3
I updated this project a couple of days ago, could you try it again?
Worked, until the mysql connection:
Failed to connect to database. Reason: 'SQLSTATE[HY000] [2002] No such file or directory'
The mysql host is probably wrong. It should be mysql
not localhost.
If not, check that the mysql container is running correctly (docker ps
). It can fail to start if the port is already in use.
909c03239d0e opencart-docker_apache "/opt/docker/bin/ent…" 6 seconds ago Up 5 seconds 443/tcp, 0.0.0.0:8081->80/tcp opencart-docker_apache_1 223f157c1a1d mysql:5.7 "docker-entrypoint.s…" 7 seconds ago Up 6 seconds 0.0.0.0:3306->3306/tcp, 33060/tcp opencart-docker_mysql_1 afc0224d32ab opencart-docker_php-fpm "docker-php-entrypoi…" 7 seconds ago Up 6 seconds 9000/tcp opencart-docker_php-fpm_1
Looks like it is running correctly. Did you set the mysql hostname?
On a brand new installation set it here:
On an existing installation change the value set in the config.php
and admin/config.php
files from
define('DB_HOSTNAME', 'localhost');
to
define('DB_HOSTNAME', 'mysql');
I have followed the instruction on the README.md and have not worked, maybe the instructions not work well for made a copy of the opencart on the directory. Can you help me setup the enviroment?
Thanks