Islandora / documentation

Contains islandora's documentation and main issue queue.
MIT License
104 stars 71 forks source link

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

Open ruebot opened 4 years ago

ruebot commented 4 years ago

Setup:

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 commented 4 years ago

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 commented 4 years ago

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

ruebot commented 4 years ago

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

krejcir commented 3 years ago

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 :-(.