Code Monkey home page Code Monkey logo

Comments (11)

vimagick avatar vimagick commented on June 5, 2024 1

If you're using this docker-compose.yml

opencart:
  image: vimagick/opencart
  ports:
    - "8000:80"
  links:
    - mysql
  volumes:
    - /var/www/html
  restart: always

mysql:
  image: mysql
  environment:
    - MYSQL_ROOT_PASSWORD=root
    - MYSQL_DATABASE=opencart
  restart: always

The Hostname should be mysql (not localhost).

from dockerfiles.

BrunoCodeman avatar BrunoCodeman commented on June 5, 2024

Thanks for your reply! After following your instructions, now I'm having another error - "php_network_getaddresses: getaddrinfo failed: Name or service not known" =/

from dockerfiles.

vimagick avatar vimagick commented on June 5, 2024

Please run this command:

docker exec your_opencart_container_name ping mysql

Make sure you can access mysql inside opencart container.

from dockerfiles.

BrunoCodeman avatar BrunoCodeman commented on June 5, 2024

ping: unknown host.

from dockerfiles.

BrunoCodeman avatar BrunoCodeman commented on June 5, 2024

Can it be an issue with the fact that I'm running the container on Kitematic?

from dockerfiles.

BrunoCodeman avatar BrunoCodeman commented on June 5, 2024

Nevermind, My MySQL container wasn't running. Thanks for your help!

from dockerfiles.

Alok123456 avatar Alok123456 commented on June 5, 2024

Hi, i am also using OpenCart Application and have hosted it on bluemix but i am stuck at the database Configuration which has been shown in the above image. How can i complete this information as i want to use bluemix database service instance. So, i am confused that which database service instance of bluemix i should use and how will i be able to configure OpenCart database configure settings on that bluemix database instance ? Please provide me any details regarding that.

from dockerfiles.

vimagick avatar vimagick commented on June 5, 2024

Run this command on your machine to make sure mysql service is up and running:

# You need create the database, or use the one that service provider gives to you
# Service provider may give you mysql instance which uses none-standard port number
$ mysql -h bluemix-mysql-server -P 3306 -u username -p opencart

Then type the correct parameters into the text fields.

from dockerfiles.

Alok123456 avatar Alok123456 commented on June 5, 2024

ok sure

from dockerfiles.

Alok123456 avatar Alok123456 commented on June 5, 2024

It's giving me an error while i am running this command which is "ERROR 2005 (HY000): Unknown MySQL server host 'bluemix-mysql-server' (0)". What to do to solve this issue.

from dockerfiles.

vimagick avatar vimagick commented on June 5, 2024

I haven't used mysql cloud service from bluemix yet.
You need to find the settings on its dashboard somewhere.
Don't use bluemix-mysql-server, it's just a placeholder.

from dockerfiles.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.