Getting Access denied when executing queries in mysql database

319 views
Skip to first unread message

Riyaz Shaik

unread,
May 4, 2021, 10:26:40 PM5/4/21
to cBioPortal for Cancer Genomics Discussion Group
Hello All,

Iam new to cbioportal and Iam trying to setup cbioportal in my local machine - windows . Iam using docker desktop for windows with ubuntu using wsl. I cloned the sampled project "https://github.com/cBioPortal/cbioportal-docker-compose.git". I ran init.sh script after that. When I ran "docker compose up" command the app is not getting started at all. I see Access denied error while trying to run mysql queries - " '@'172.20.0.5' (using password: YES)   | 2021-05-05T01:52:22.069047Z 6 [Note] Access denied for user 'cbio_user". Can someone please tell me what is the issue? 


Thanks,
Riyaz
Capture.JPG

Riyaz Shaik

unread,
May 5, 2021, 1:35:49 AM5/5/21
to cBioPortal for Cancer Genomics Discussion Group
Iam trying to install cbioportal using docker

Benjamin Gross

unread,
May 5, 2021, 11:49:20 AM5/5/21
to Riyaz Shaik, cBioPortal for Cancer Genomics Discussion Group
Hi Riyaz,

We are sorry you are having problems running cBioPortal.  I’m not sure what is happening yet, but I don’t believe the access denied error is the cause because I think other updates run prior to this (starting around version 2.7.4) and there also seems to be a foreign key constraint error.  Is it possible to provide me with the entire output of running docker-compose up?

Regards,
Benjamin

-- 
You received this message because you are subscribed to the Google Groups "cBioPortal for Cancer Genomics Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cbioportal+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cbioportal/98c99a22-6eb9-4a66-b72a-c3b173e9847dn%40googlegroups.com.

Riyaz Shaik

unread,
May 5, 2021, 12:13:30 PM5/5/21
to cBioPortal for Cancer Genomics Discussion Group
Hello Benjamin,

Thank you very much for replying me back. please find attachment of the entire compose log.

Thanks,
Riyaz

compose_run_log.txt

Benjamin Gross

unread,
May 5, 2021, 2:40:36 PM5/5/21
to Riyaz Shaik, cBioPortal for Cancer Genomics Discussion Group
Hi Riyaz,

Can you try doing the following:

1 - docker-compose down -v (this will clear the persistent data volumes)
2 - git pull within your cbioportal-docker-compose git repos (make sure to have the latest)
3 - rerun init.sh (provide me with log)
4 - rerun docker-compose up (provide me with log)

I ask because your log file doesn’t correspond with mine (I just checked out the latest cbioportal-docker-compose repos) and I’m not sure why.

Best,
Benjamin

compose_run_log.txt

Riyaz Shaik

unread,
May 5, 2021, 10:49:20 PM5/5/21
to cBioPortal for Cancer Genomics Discussion Group
Hello Benjamin,

PFA logs when I ran

1 - docker-compose down -v
2 - git pull 
3 - init.sh 
4 - docker-compose up

Please let me know if you need anything else.
I currently trying to setup cbioportal in windows 10 system using docker desktop for windows using wsl (ubuntu).

git_pull.txt
docker_compose_down.JPG
init.sh.txt
docker_compose_up.JPG
init.JPG
docker_compose_up.txt

Benjamin Gross

unread,
May 6, 2021, 10:07:49 AM5/6/21
to Riyaz Shaik, cBioPortal for Cancer Genomics Discussion Group
Riyaz,

Do you have any other output when running init.sh?  I’m looking for output that shows the fetching of cgds.sql, seed-cbioportal*.sql.gz:


Also, just to confirm that your database is running and you have access (which I believe you do) you should be able to run the following to connect to the mysql database.

docker-compose run cbioportal_database \
sh -c 'mysql -hcbioportal_database -u"$MYSQL_USER" -p"$MYSQL_PASSWORD" "$MYSQL_DATABASE”'

And then run mysql commands like:

use cbioportal;
show tables;

Best,
B

git_pull.txt
docker_compose_up.txt
init.sh.txt
docker_compose_down.txt
init.jpeg
docker_compose_down.JPG
docker_compose_up.JPG

Riyaz Shaik

unread,
May 6, 2021, 3:50:15 PM5/6/21
to cBioPortal for Cancer Genomics Discussion Group
Hello Benjamin,

Unfortunately I was not able to log that output in that text file but I attached the screen shot of fetching the files in init.jpeg file. Can you please check if that was what you needed?

Thanks,
Riyaz

Riyaz Shaik

unread,
May 6, 2021, 3:54:20 PM5/6/21
to cBioPortal for Cancer Genomics Discussion Group
Also, Iam not able to run the above commands you have told me as the container is stopped. The container is getting stopped because its not able to execute queries and then retrying to start up so that it can execute the queries and then failing and then the container is getting stopped.

Thanks,
Riyaz

On Thursday, 6 May 2021 at 10:07:49 UTC-4 Benjamin Gross wrote:

Benjamin Gross

unread,
May 7, 2021, 10:40:38 AM5/7/21
to Riyaz Shaik, de Bruijn, Ino/Sloan Kettering Institute, cBioPortal for Cancer Genomics Discussion Group
Hi Riyaz,

Ah, I see - I thought the docker-compose run command would have short-circuited the migration step and started the service.  I’d like to bring Ino de Bruijn into the conversation.  He’s our resident docker-compose expert and hopefully can shed some light on the situation.

Ino, Riyaz docker-compose up command is failing with errors that appear to me to be caused by the database schema not getting properly migrated (not database access issues).  I followed the documented steps without a problem.  I’m not sure why the log file that Riyaz provided me does not start at the same migration step as mine.  Riyaz is running on Windows, but I imagine with docker (not sure if docker is native to windows now or running on a Linux VM) that it shouldn’t make much difference.  Any ideas?

Best,
Benjamin


de Bruijn, Ino/Sloan Kettering Institute

unread,
May 9, 2021, 9:50:13 PM5/9/21
to Benjamin Gross, Riyaz Shaik, cBioPortal for Cancer Genomics Discussion Group

Hi Riyaz,

 

Thanks for reaching out

 

I think something is going wrong with the initialization of the mysql container. It should load two sql files on first boot. That is you should see something like the following (i.e. it’s loading cgds.sql and seed.sql.gz):

 

2021-05-10 01:17:59+00:00 [Note] [Entrypoint]: Creating database cbioportal

2021-05-10 01:17:59+00:00 [Note] [Entrypoint]: Creating user cbio_user

2021-05-10 01:17:59+00:00 [Note] [Entrypoint]: Giving user cbio_user access to schema cbioportal

2021-05-10 01:17:59+00:00 [Note] [Entrypoint]: /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/cgds.sql

2021-05-10 01:18:00+00:00 [Note] [Entrypoint]: /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/seed.sql.gz

 

It might help to look at the database container logs in isolation:

 

docker logs cbioportal-database-container

 

I’m not too familiar with the windows setup unfortunately, a few scripts that run as part of init.sh are bash so that might throw things off. You’ll want to make sure you see the cgds.sql.gz and seed.sql.gz files mounted inside of the database container. You can e.g. exec into the container and check if you see these files:

 

/docker-entrypoint-initdb.d/cgds.sql

/docker-entrypoint-initdb.d/seed.sql.gz

 

Hope that helps!

 

Best wishes,

Ino



*** Only open attachments or links from trusted senders. Report phishing to inf...@mskcc.org ***

 

=====================================================================

Please note that this e-mail and any files transmitted from
Memorial Sloan Kettering Cancer Center may be privileged, confidential,
and protected from disclosure under applicable law. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any reading, dissemination, distribution,
copying, or other use of this communication or any of its attachments
is strictly prohibited. If you have received this communication in
error, please notify the sender immediately by replying to this message
and deleting this message, any attachments, and all copies and backups
from your computer.

Reply all
Reply to author
Forward
0 new messages