DB-Backup Issue during Migration - Please ensure on MySQL that the user has Process priviliges

Checklist
I have read intro post: https://community.passbolt.com/t/about-the-installation-issues-category/12
I have read the tutorials, help and searched for similar issues
I provide relevant information about my server (component names and versions, etc.)
I provide a copy of my logs and healthcheck
I describe the steps I have taken to trouble shoot the problem
I describe the steps on how to reproduce the issue

I am using a ubuntu 22.04. package installation and i am following this guide to backup my database to migrate to 24.04.

The error i am getting during backup:

sudo su -s /bin/bash -c “/usr/share/php/passbolt/bin/cake passbolt mysql_export” www-data

 ____                  __          ____
/ __ \____  _____ ____/ /_  ____  / / /_

/ // / __ `/ / / __ / __ / / _/
/ / // ( | ) // / // / / /
// _,///
./_//__/

Open source password manager for teams

Saving backup file: /var/lib/passbolt/tmp/cache/database/backup_1753886098.sql
mysqldump: [Warning] Using a password on the command line interface can be insecure.
mysqldump: Couldn’t execute ‘SHOW FIELDS FROM users_resources_permissions’: View ‘passboltdb.users_resources_permissions’ references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them (1356)
There was an error running the dump.
Please ensure on MySQL that the user has PROCESS privileges.
Database passboltdb
User passboltadmin
Something went wrong!

Here you can see the Grants on the mysql-user from passbolt.php:

mysql> SHOW GRANTS FOR passboltadmin@localhost;
±----------------------------------------------------------------------+
| Grants for passboltadmin@localhost |
±----------------------------------------------------------------------+
| GRANT PROCESS ON . TO passboltadmin@localhost |
| GRANT ALL PRIVILEGES ON passbolt.* TO passboltadmin@localhost |
| GRANT ALL PRIVILEGES ON passboltdb.* TO passboltadmin@localhost |
±----------------------------------------------------------------------+
3 rows in set (0,00 sec)

Healthcheck shell

Environment

[PASS] PHP version 8.1.2-1ubuntu2.22.
[PASS] PHP version is 8.1 or above.
[PASS] PCRE compiled with unicode support.
[PASS] Mbstring extension is installed.
[PASS] Intl extension is installed.
[PASS] GD or Imagick extension is installed.
[PASS] The temporary directory and its content are writable and not executable.
[PASS] The logs directory and its content are writable.

Config files

[PASS] The application config file is present
[PASS] The passbolt config file is present

Core config

[PASS] Cache is working.
[PASS] Debug mode is off.
[PASS] Unique value set for security.salt
[PASS] Full base url is set to xxx
[PASS] App.fullBaseUrl validation OK.
[PASS] /healthcheck/status is reachable.

SSL Certificate

[PASS] SSL peer certificate validates.
[PASS] Hostname is matching in SSL certificate.
[PASS] Not using a self-signed certificate.

SMTP settings

[PASS] The SMTP Settings plugin is enabled.
[PASS] SMTP Settings coherent. You may send a test email to validate them.
[PASS] The SMTP Settings source is: database.
[WARN] The SMTP Settings plugin endpoints are enabled.
[HELP] It is recommended to disable the plugin endpoints.
[HELP] Set the PASSBOLT_SECURITY_SMTP_SETTINGS_ENDPOINTS_DISABLED environment variable to true.
[HELP] Or set passbolt.security.smtpSettings.endpointsDisabled to true in /etc/passbolt/passbolt.php.
[PASS] No custom SSL configuration for SMTP server.

JWT Authentication

[PASS] The JWT Authentication plugin is enabled.
[PASS] The /etc/passbolt/jwt/ directory is not writable.
[PASS] A valid JWT key pair was found.

GPG Configuration

[PASS] PHP GPG Module is installed and loaded.
[PASS] The environment variable GNUPGHOME is set to /var/lib/passbolt/.gnupg.
[PASS] The directory /var/lib/passbolt/.gnupg containing the keyring is writable by the webserver user.
[PASS] The server OpenPGP key is not the default one.
[PASS] The public key file is defined in /etc/passbolt/passbolt.php and readable.
[PASS] The private key file is defined in /etc/passbolt/passbolt.php and readable.
[PASS] The server key fingerprint matches the one defined in /etc/passbolt/passbolt.php.
[PASS] The server public key defined in the /etc/passbolt/passbolt.php (or environment variables) is in the keyring.
[PASS] There is a valid email id defined for the server key.
[PASS] The public key can be used to encrypt a message.
[PASS] The private key can be used to sign a message.
[PASS] The public and private keys can be used to encrypt and sign a message.
[PASS] The private key can be used to decrypt a message.
[PASS] The private key can be used to decrypt and verify a message.
[PASS] The public key can be used to verify a signature.
[PASS] The server public key format is Gopengpg compatible.
[PASS] The server private key format is Gopengpg compatible.

Application configuration

[FAIL] This installation is not up to date. Currently using 4.8.0 and it should be 5.3.2.
[HELP] See xxx
[FAIL] Passbolt is not configured to force SSL use.
[HELP] Set passbolt.ssl.force to true in /etc/passbolt/passbolt.php.
[PASS] App.fullBaseUrl is set to HTTPS.
[PASS] Selenium API endpoints are disabled.
[PASS] Search engine robots are told not to index content.
[INFO] The Self Registration plugin is enabled.
[INFO] Registration is closed, only administrators can add users.
[PASS] The deprecated self registration public setting was not found in /etc/passbolt/passbolt.php.
[WARN] Host availability checking is disabled.
[HELP] Make sure this instance is not publicly available on the internet.
[HELP] Or set the PASSBOLT_EMAIL_VALIDATE_MX environment variable to true.
[HELP] Or set passbolt.email.validate.mx to true in /etc/passbolt/passbolt.php.
[PASS] Serving the compiled version of the javascript app.
[WARN] Some email notifications are disabled by the administrator.
[PASS] The database schema up to date.

Database

[PASS] The application is able to connect to the database
[PASS] 32 tables found.
[PASS] Some default content is present.

[FAIL] 2 error(s) found. Hang in there!

I also did a cleanup and a datacheck via cli with no errors.

Perhaps someone can help me with help.

Hello timot43,
From what I understand, it looks like there’s a view lingering in your database that references data or tables that no longer exist. I recommend running the following command in your Passbolt database:

DROP VIEW IF EXISTS users_resources_permissions;

This should help resolve the issue. Let us know how it goes!
Have a great day.

I needed to use passboltdb.users_resources_permissions; because it didn't work with use passboltdb; thanks for the solution and the fast help. i was not sure about your db design and the view sounds important.but some update must brought the view because i don’t create them myself.