Post by srse » Thu May 23, 2019 3:02 pm

OC Version: 3.0.3.2
Theme: N/A
Extension/Mods: N/A

I'm just trying to get started developing locally and on step 3/4 of configuration where I'm supposed to put in database connection details, I'm getting:

Code: Select all

 Error: Could not make a database link using root@localhost!
Here is my docker-compose.yml (myrepo is a placeholder for my actual repo):

Code: Select all

opencart:
  image: myrepo/opencart:3.0.3.2
  ports:
    - "3000:80"
  links:
    - mysql
  volumes:
    - /var/www
    - /var/www/html/system/storage/vendor

mysql:
  image: mysql
  environment:
    - MYSQL_USER=root
    - MYSQL_ROOT_PASSWORD=opencart
    - MYSQL_DATABASE=db_opencart
  ports:
    - '3306:3306'
  expose:
    - '3306'
  volumes:
    - ./db:/var/lib/mysql
And here is what I have in configuration (the password is correct):

Image

I'm starting it up with `docker-compose up` and I'm able to walk through the configuration steps up until this. Can anyone help point to what might be going wrong?

Newbie

Posts

Joined
Thu May 23, 2019 2:38 pm

Post by dparakhiya » Thu May 23, 2019 6:09 pm

On step 3: Add hostname "mysql" instead of localhost

For quick, professional OpenCart support
Online
contact me on skype : dparakhiya_1
email : dipneshp@gmail.com


User avatar
New member
Online

Posts

Joined
Fri Jul 28, 2017 1:13 pm
Location - India

Post by srse » Thu May 23, 2019 11:19 pm

dparakhiya wrote:
Thu May 23, 2019 6:09 pm
On step 3: Add hostname "mysql" instead of localhost
Thank you dparakhiya; I should have known that. But now it shows:

Code: Select all

Error: Could not make a database link using root@mysql!
Anything else wrong with the way I've set this up?

Newbie

Posts

Joined
Thu May 23, 2019 2:38 pm

Post by srse » Fri May 24, 2019 4:15 am

Nevermind, I gave up on setting it up myself and went with bitnami/opencart. Super easy to get started!!! :o

Newbie

Posts

Joined
Thu May 23, 2019 2:38 pm
Who is online

Users browsing this forum: No registered users and 289 guests