Content
You are here:
Auth error when migrating from MySQL
Added by Hayley IT almost 5 years ago
Hello,
I am struggling to migrate our OpenProject DB from MySQL to PostgreSQL (have just upgraded from v9 to v10 so am forced to do so).
I am following the guide here: https://docs.openproject.org/installation-and-operations/misc/packaged-postgresql-migration/
I have set the PSQL DB credentials correctly:
DATABASE_URL=postgresql://openproject:testpass@localhost/openproject
If I log in with the creds, it's fine:
[root@g000027 config]# psql --username=openproject --password
Password for user openproject:
psql (9.5.20)
Type "help" for help.
openproject=>
But, when I run the migration tool:
[root@g000027 config]# sudo openproject run ./docker/mysql-to-postgres/bin/migrate-mysql-to-postgres
Migrating database from MySQL to PostgreSQL.
Import
MySQL database
mysql://openproject:REDACTED@127.0.0.1:3306/openproject
into Postgres database
postgresql://openproject:REDACTED@localhost/openproject
?
WARNING: This resets the given Postgres database.
Y/n y
Resetting target database...
psql: FATAL: Ident authentication failed for user "openproject"
[root@g000027 config]#
How/why is the authentication failing when I've manually tested that it's correct?
Please help! My OpenProject service is shafted at the moment because of this.
Thank you!
P.S. I am rubbish with PostgreSQL
Replies (2)
Did you find a solution to this issue? I am having the same problem.
You could try temporarily trusting the openproject user by editing the postgresql config file pg_hba.conf. For example, on ubuntu 20.04 runnigng postgres 12:
sudo nano /etc/postgresql/12/main/pg_hba.conf
add or edit the line to trust the local openproject user:
local all openproject trust
...then restarting postgresql:
sudo systemctl restart postgresql