I was facing the same issues and the following post helped me.
https://www.digitalocean.com/community/tutorials/how-to-create-a-new-user-and-grant-permissions-in-mysql
Please note that, if you’re using MySQL 8 or above, you would need to use the 
following command to grant permissions to your user:
GRANT ALL PRIVILEGES ON *.* TO 'UserName'@'%' WITH GRANT OPTION;

You would need to install the mysql-client to execute these commands.
Since we are trying to connect from airavata, you would need to grant 
permissions for the user ‘airavata’. (Refer to docker-compose.yml for mysql 
credentials)

Once I grant these permissions, I do not see the database exceptions any more.

Regards,
Vivek.

From: Nayeemullah Baig <[email protected]>
Reply-To: "[email protected]" <[email protected]>
Date: Monday, March 30, 2020 at 2:57 PM
To: "[email protected]" <[email protected]>
Subject: Re: [External] Airavata database connection error while starting

Hi Aarushi,

I followed the steps which were updated on the wiki. mysql is currently 
running, I have attached the log as well. But I'm now getting two errors.

1. Exception in thread "main" java.lang.RuntimeException: Failed to initialize 
database for database_scripts/expcatalog
2. Caused by: java.sql.SQLException: Host '172.18.0.1' is not allowed to 
connect to this MySQL server.

A few things which I had to do additionally, after restarting the db docker, 
the database_data owner was 'systemd-coredump', that was the reason I got the 
permission denied error previously, I changed the owner of the directory and 
subdirectories and files using ' sudo chown -R kubeadmin:kubeadmin 
database_data/ '

Any help would be appreciated.

Thanks,
Nayeem

On Sun, Mar 29, 2020 at 1:57 AM Bisht, Aarushi 
<[email protected]<mailto:[email protected]>> wrote:

Hi Nayeem,



Since a lot of you are facing the same database issue, I have added a note to 
the 
cwiki<https://cwiki.apache.org/confluence/display/AIRAVATA/Setup+your+local+Airavata+Development+Environment>.
 If you are still facing the issue, send us the logs of the db container and we 
can try to debug the issue. You can also verify the initialized databases by 
connecting to the database using the following command(credentials can be found 
in docker-compose.yml file):



docker exec -it <container name> mysql -u root -p



- Aarushi Bisht

________________________________
From: Nayeemullah Baig 
<[email protected]<mailto:[email protected]>>
Sent: Sunday, March 29, 2020 1:00 AM
To: [email protected]<mailto:[email protected]>
Subject: [External] Airavata database connection error while starting

This message was sent from a non-IU address. Please exercise caution when 
clicking links or opening attachments from external sources.

Hi,

While starting Airavata, I run into the following database connection error.

Attached the screenshot and error message.

Thanks,
Nayeem.

Reply via email to