Steps to Reproduce:
I followed this guide:
https://wiki.chairat.me/books/docker/page/how-to-setup-mediawiki-with-docker
Actual Results:
The configuration phase does not recognize the mysql db
Steps to Reproduce:
I followed this guide:
https://wiki.chairat.me/books/docker/page/how-to-setup-mediawiki-with-docker
Actual Results:
The configuration phase does not recognize the mysql db
Hi @Manang! You are free to follow random web pages written by random folks about ancient software versions, but that's not something we can support here. :)
Please see https://www.mediawiki.org/wiki/How_to_report_a_bug if you think that there is some software bug somewhere, and include:
You can edit the task description by clicking . Ideally, a good description should allow any other person to follow these steps (without having to interpret steps) and see the same results. Problems that others can reproduce can get fixed faster. Thanks!
Hi,
sorry if I followed the wrong guide.
I followerd the official guide, too
https://hub.docker.com/_/mediawiki
I tried with docker compose, but nothing, during the first configuration it is impossible to connect the db to the mediawiki project.
I used the same stack.yml file, with the same password and user
During the configuration I used localhost as url of the db.
I optioned the following message:
Cannot access the database: :real_connect(): (HY000/2002): No such file or directory. Check the host, username and password and try again. If using "localhost" as the database host, try using "127.0.0.1" instead (or vice versa).
Ideas?
I think tha the two guides are equivalents
Angelo
@Manang: Please see my previous comment: Please provide a complete (!) list (!) of steps, as a list, with commands, which lead to that error message.
Hi,
my version of docker: 2.3.0.3 (45519)
host: mac os x 10.15.5
the steps are:
I create the stack.yml file with the following content:
# MediaWiki with MariaDB # # Access via "http://localhost:8080" # (or "http://$(docker-machine ip):8080" if using docker-machine) version: '3' services: mediawiki: image: mediawiki restart: always ports: - 8080:80 links: - database volumes: - /var/www/html/images # After initial setup, download LocalSettings.php to the same directory as # this yaml and uncomment the following line and use compose to restart # the mediawiki service # - ./LocalSettings.php:/var/www/html/LocalSettings.php database: image: mariadb restart: always environment: # @see https://phabricator.wikimedia.org/source/mediawiki/browse/master/includes/DefaultSettings.php MYSQL_DATABASE: my_wiki MYSQL_USER: wikiuser MYSQL_PASSWORD: example MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
After, I deployed the stack with the following command:
docker stack deploy -c stack.yml mediawiki
At the end I opened the configuration page of mediawiki (http://localhost:8080).
I put the following data
Database hos: localhost
database name: my_wiki
database username: wikiuser
database password: example
What I expected is that the configuration process recognizes the database, in this case mariaDb, but I tried with mysql and the situation is the same.
What I obtained is the following error message:
Cannot access the database: :real_connect(): (HY000/2002): No such file or directory. Check the host, username and password and try again. If using "localhost" as the database host, try using "127.0.0.1" instead (or vice versa).
Thanks
Angelo
Thanks! Copying a wild idea from https://stackoverflow.com/questions/57312109/mediawiki-docker-official-image-connection-refused-by-mysql :
Ugh. I got it to work by changing the Database host to simply database.
@dbarratt: Nothing has been resolved here, hence reopening. This task has a Documentation tag.
I also ran into this and the solution was the same: the hostname needs to be the name of the docker host when running with docker-compose. I'd submit a PR, but the error is on Docker Hub, and I don't see an obvious way to edit that.
The docs are located here:
https://github.com/docker-library/docs/tree/master/mediawiki