Closed derek-shnosh closed 4 years ago
Is your MySQL also a docker container? On the same host as Wiki.js docker container?
@Smankusors, MySQL is not in a docker container, but it is running on the Ubuntu server (VM) that the WikiJS docker container is on.
I'm doing something similiar with Bitwarden_RS, and have done this with WikiJS previously; seems maybe a version bump along the way changed something that broke this for WikiJS though.
You should be using 172.17.0.1
as the DB_HOST if you're trying to connect to a host MySQL server from within a docker container.
@NGPixel, I changed my docker run command as follows:
docker run -d --name wiki --restart unless-stopped -p 8081:3000 -e "DB_TYPE=mysql" -e "DB_HOST=172.17.0.1" -e "DB_PORT=3306" -e "DB_NAME=wikijs" -e "DB_USER=wikijs" -e "DB_PASS=ommitted" requarks/wiki:2
However I'm still getting the same error after 10 attemps:
error: Database Initialization Error: Access denied for user 'wikijs'@'172.17.0.3' (using password: YES)
I checked mysql privs for the wikijs user and found that it was only allowing login from localhost
; the DB connection succeeded after making the appropriate adjustments and I am now looking at the install screen.
Question Running Ubuntu server, I have a MySQL database created and am using this command to start via docker:
docker run -d --name wiki --restart unless-stopped -p 8081:3000 -e "DB_TYPE=mysql" -e "DB_HOST=10.19.128.210" -e "DB_PORT=3306" -e "DB_NAME=wikijs" -e "DB_USER=wikijs" -e "DB_PASS=omitted" requarks/wiki:2
Running
sudo docker logs wiki
shows the following error:error: Database Connection Error: ER_ACCESS_DENIED_ERROR undefined:undefined
After 10 attempts it seems to show that its trying to connect to a database inside the docker container.
error: Database Initialization Error: Access denied for user 'wikijs'@'172.17.0.3' (using password: YES)
Full Log
Host Info (please complete the following information): OS: Ubuntu 18.04, Docker Wiki.js version: 2.3.81 Database engine: mysql Ver 14.14 Distrib 5.7.30