[ 
https://issues.apache.org/jira/browse/FINERACT-1294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17267151#comment-17267151
 ] 

Benura Abeywardena edited comment on FINERACT-1294 at 1/18/21, 1:21 PM:
------------------------------------------------------------------------

This issue is caused by the password we grant for the mysql user. This "Access 
Denied" issue comes after restarting the mysql container that has already been 
mounted using minikube hostpath. By giving a constant password other than a 
random password would help to get rid of this issue.

*Steps to Reproduce*

*1.) Method 1*

Change the command in kubectl-startup.sh which is used to create username and 
password for mysql as follows.
{code:java}
kubectl create secret generic fineract-tenants-db-secret 
--from-literal=username=root --from-literal=password=root{code}
 Also the liveness probe command needs to be updated as
{code:java}
mysqladmin ping -h localhost -uroot -p${MYSQL_ROOT_PASSWORD}{code}
 

*2.) Method 2*

Use an initcontainer instead for mounting volume in /var/lib/mysql directory. 
This would prevent having "Access Denied" issue after restarting.


was (Author: blasan):
This issue is caused by the password we grant for the mysql user. This "Access 
Denied" issue comes after restarting the mysql container that has already been 
mounted using minikube hostpath. By giving a constant password other than a 
random password would help to get rid of this issue.

*Steps to Reproduce*

*1.) Method 1*

Change the command in kubectl-startup.sh which is used to create username and 
password for mysql as follows.
{code:java}
kubectl create secret generic fineract-tenants-db-secret 
--from-literal=username=root --from-literal=password=root{code}
 Also the liveness probe command needs to be updated as
{code:java}
mysqladmin ping -h localhost -uroot -p${MYSQL_ROOT_PASSWORD}{code}
 

2.) Method 2

Use an initcontainer instead for mounting volume in /var/lib/mysql directory. 
This would prevent having "Access Denied" issue after restarting.

> Error in volume mounting in mysql 5.7 container
> -----------------------------------------------
>
>                 Key: FINERACT-1294
>                 URL: https://issues.apache.org/jira/browse/FINERACT-1294
>             Project: Apache Fineract
>          Issue Type: Bug
>    Affects Versions: 1.4.0
>         Environment: Kubectl Client Version -  1.20.1
> Kubectl Server Version - 1.19.2
> OS - Ubuntu 20.04
> Minikube Version - 1.14.2
>            Reporter: Benura Abeywardena
>            Assignee: Benura Abeywardena
>            Priority: Blocker
>             Fix For: 1.5.0
>
>
> In mysql container there'll be an error coming out when mounting the path 
> /var/lib/mysql/ using PVC. Fineract container will be switched to a 
> CrashLoopBackOff due to access denied issue. Even when trying to run 
> mysqladmin command inside mysql5.7 docker image, it's giving the same issue 
> "Access Denied to root@localhost (Using Password: YES)"



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to