Openmrs database backup failure

Hello Community

I am trying to backup my openmrs database by issuing this command:

bahmni -i local backup --backup_type=db --options=openmrs

but I keep getting below error

fatal: [localhost]: FAILED! => {"changed": true, "cmd": "mysql -uroot -ppassword -e 'SHOW DATABASES;' | grep openmrs", "delta": "0:00:00.009995", "end": "2022-01-12 14:43:55.375632", "failed": true, "rc": 1, "start": "2022-01-12 14:43:55.365637", "stderr": "Warning: Using a password on the command line interface can be insecure.\nERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)", "stdout": "", "stdout_lines": [], "warnings": []}

fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "ERROR: Database: openmrs does not exist"}

What could be the issue?

It seems to be using the password: password. Is that the right password of your openmrs db? Maybe it is: P@ssw0rd. Please check. The default password was changed in V0.92.

Under the hood, Bahmni fires mysqldump command. You can try running that directly to see what happens:

  1. Mysql Dump command:
  2. See example commands here: utilities/deprecated/scripts at master · Bahmni/utilities · GitHub

I used password as dummy text before posting here. I’m just wondering where it is reading the password because even the one that was shown is not the correct one. I had already changed it from the default one.

Thanks, Ill check out the recommended articles

The bahmni command reads the password I believe from: /etc/bahmni-installer/setup.yml. See: