Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Fedora DB (mysql) fails when deploying to remote machine #1631

Open
ruebot opened this issue Sep 25, 2020 · 4 comments
Open

Create Fedora DB (mysql) fails when deploying to remote machine #1631

ruebot opened this issue Sep 25, 2020 · 4 comments
Labels
Subject: Ansible Playbook Related to the maintenance and upkeep associated with an Ansible Playbook for Islandora. Always also Subject:Deployment related to deployment of Islandora. Usually accompanied by the deployment flavour (Ansible/docker)

Comments

@ruebot
Copy link
Member

ruebot commented Sep 25, 2020

Setup:

  • Following instructions as outlined here
  • ansible-galaxy install -r requirements.yml
  • ansible-playbook -i inventory/yudl8 playbook.yml -e "islandora_distro=ubuntu/bionic64" --extra-vars "ansible_sudo_pass=some_password"

TASK [Islandora-Devops.fcrepo : Create Fedora DB (mysql) fails

fatal: [default]: FAILED! => {"changed": false, "msg": "unable to connect to database, check login_user and login_password are correct or /root/.my.cnf has the credentials. Exception message: (1045, \"Access denied for user 'root'@'localhost' (using password: YES)\")"}
@ruebot ruebot changed the title TASK [Islandora-Devops.fcrepo : Create Fedora DB (mysql) fails Create Fedora DB (mysql) fails when deploying to remote machine Sep 25, 2020
@ruebot ruebot added the Ansible label Sep 25, 2020
@ruebot
Copy link
Member Author

ruebot commented Sep 25, 2020

I ended up removing login_host, login_port, login_user, and login_password. Basically, similar to the approach in ansible-role-matomo.

In the end what worked for me was:

- name: Create Fedora DB (mysql)
  mysql_db:
    name: "{{ fcrepo_db_name }}"
    state: present
  register: fcrepo_db_exists

- name: Create Fedora DB User (mysql)
  mysql_user:
    name: "{{ fcrepo_db_user }}"
    password: "{{ fcrepo_db_password }}"
    state: present
    priv: "{{fcrepo_db_name}}.*:ALL"

If y'all want a PR for this, I can take care of it. Just let me know. Or the current approach is the preferred approach, was can just close this issue, and it can serve as gotcha documentation for anybody using the playbook for remote installs.

@dannylamb
Copy link
Contributor

Did you try setting -e claw_db=mysql ? I've found that's an extra one I need to set. YMMV

@ruebot
Copy link
Member Author

ruebot commented Oct 7, 2020

Oh, I didn't think of trying that! I'll give that a shot next time I fire-up a machine.

@krejcir
Copy link

krejcir commented Jan 15, 2021

Did you try setting -e claw_db=mysql ? I've found that's an extra one I need to set. YMMV

I've just tried this and it didn't help :-(.

@kstapelfeldt kstapelfeldt added Subject:Deployment related to deployment of Islandora. Usually accompanied by the deployment flavour (Ansible/docker) Subject: Ansible Playbook Related to the maintenance and upkeep associated with an Ansible Playbook for Islandora. Always also and removed Ansible labels Sep 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Subject: Ansible Playbook Related to the maintenance and upkeep associated with an Ansible Playbook for Islandora. Always also Subject:Deployment related to deployment of Islandora. Usually accompanied by the deployment flavour (Ansible/docker)
Projects
Development

No branches or pull requests

4 participants