7

I'm trying to install MediaWiki using the official docker image at MediaWiki Docker Official Image

I'm on a Windows 10 box and used docker-compose with the stack.yml file that the page has on the instructions.

It all deploys and starts, but when I connect and try to run the initial configuration, I run into errors.

I changed the database username to "wikiuser" and use "example" as the password - as set in the yml file. When I click "Continue" I get

Cannot access the database: :real_connect(): (HY000/2002): No such file or directory.

If I change the "Database host" from localhost to 127.0.0.1, I get: Cannot access the database: :real_connect(): (HY000/2002): Connection refused.

I even tried it in the "Try in PWD" link and had the same results on the "Play with Docker" virtual machine.

Is something missing from the yml file? I also tried adding a ports setting in the yml file and exposed 3306:3306, but got the same results.

Any ideas?

Anshu
  • 1,277
  • 2
  • 13
  • 28
Perlguy
  • 982
  • 10
  • 25

1 Answers1

11

Ugh. I got it to work by changing the Database host to simply database Or to the name of the database-service in docker-compose file if you changed it.

This should probably be in their setup documentation.

S.Yadav
  • 4,273
  • 3
  • 37
  • 44
Perlguy
  • 982
  • 10
  • 25
  • 1
    OMG, thank you. This should be marked as the answer. I have had issues with multiple projects' documentation on Docker Hub, unfortunately. – bwasilewski Apr 12 '20 at 19:17
  • I did struggle with that too and luckally found this post, thank you. Although it should be clear looking at their docker-compose file found here: https://hub.docker.com/_/mediawiki. However they are using the legacy docker links: https://docs.docker.com/network/links/ – Michamei Dec 01 '20 at 11:03