I have cat orthomcl/Dockerfile
:
FROM debian:stretch-backports
RUN apt-get update && apt-get install -y --no-install-recommends \
wget \
cpanminus \
build-essential \
default-libmysqlclient-dev \
python \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir diamond \
&& cd diamond \
&& wget -c https://github.com/bbuchfink/diamond/releases/download/v0.9.14/diamond-linux64.tar.gz \
&& tar xvf diamond-linux64.tar.gz \
&& rm *.tar.gz
RUN cpanm DBI DBD::mysql
RUN wget -c https://www.micans.org/mcl/src/mcl-latest.tar.gz
RUN tar xvf mcl-latest.tar.gz
RUN cd mcl-* && ./configure && make && make install
RUN wget -c https://orthomcl.org/common/downloads/software/v2.0/orthomclSoftware-v2.0.9.tar.gz
RUN tar xvf orthomclSoftware-v2.0.9.tar.gz
ENV PATH="/diamond:/orthomclSoftware-v2.0.9/bin:${PATH}"
This is my docker-compose.yml
:
orthomcl:
tty: true
build: orthomcl
restart: always
links:
- db
volumes:
- ./output_dir/:/output_dir
db:
image: mariadb
restart: always
environment:
- MYSQL_ROOT_PASSWORD="PAssw0rd"
- MYSQL_DATABASE="orthomcl"
- MYSQL_USER="orthomcl"
- MYSQL_PASSWORD="PAssw0rd"
ports:
- "3306:3306"
volumes:
- ./mysql/:/docker-entrypoint-initdb.d
This is the SQL config file:
$ cat mysql/orthomcl.sql
CREATE DATABASE IF NOT EXISTS `orthomcl`;
create user `orthomcl`@`db` identified by 'PAssw0rd';
GRANT ALL PRIVILEGES on `orthomcl`.* to `orthomcl`@`db`;
This is the App config file:
$ cat output_dir/orthomcl.cnf
dbVendor=mysql
dbConnectString=dbi:mysql:database=orthomcl;host=db;mysql_local_infile=1
dbLogin=orthomcl
dbPassword=PAssw0rd
similarSequencesTable=SimilarSequences
orthologTable=Ortholog
inParalogTable=InParalog
coOrthologTable=CoOrtholog
interTaxonMatchView=InterTaxonMatch
percentMatchCutoff=50
evalueExponentCutoff=-5
oracleIndexTblSpc=NONE
Next, I used docker-compose up
and after it I did:
$ docker-compose run orthomcl orthomclInstallSchema /output_dir/orthomcl.cnf orthomclInstallSchema_sql.log
Starting orthomcl_db_1 ... done
DBI connect('orthomcl:db:mysql_local_infile=1','orthomcl',...) failed: Access denied for user 'orthomcl'@'172.17.0.4' (using password: YES) at /orthomclSoftware-v2.0.9/bin/../lib/perl/OrthoMCLEngine/Main/Base.pm line 56.
MySQL logs shoows:
...
db_1 | 2019-05-03 3:40:06 0 [Note] mysqld: ready for connections.
db_1 | Version: '10.3.14-MariaDB-1:10.3.14+maria~bionic' socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution
db_1 | 2019-05-03 3:40:18 8 [Warning] Access denied for user 'orthomcl'@'172.17.0.4' (using password: YES)
How is it possible to solve the above error?
Thank you in advance.