Checklist
I have read intro post: About the Installation Issues category
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
Hi, I had a computer with passbolt that has died, I have been able to save the files on the disk, I have the database and everything, I have done on another computer a clean install with the same server name and same mails, and I have replaced your mysql database by the dead computer, but it gives me an error when trying to start the passbolt, I do not know if I would have to do something else or pass some more file to work, if not possible, is there any way I can access the data from the database? I need to see the passwords to save them.
To access the mysql command line I have used the user that I put at the beginning that is in the file passbolt.php, if I try to access with a user of the passbolt itself with an email it does not let me.
I don’t understand when you say “if I try to access with a user of the passbolt itself with an email it does not let me.”
Are you trying to logging to MySQL via an email? e.g. mysql -u admin@passbolt.com -p passboltdb ?
I saw in the screenshot that to previously logging to MySQL you used the user: quetebe as well as a password associated, this raise two questions in my mind:
Is quetebe the user that is used in the datasources credentials inside /etc/passbolt/passbolt.php ?
Does he have enough permissions on your passbolt table? (most likely passboltdb)
Yes, excuse my lack of knowledge, I am very novice in the matter, I have accessed in principle with the user that is in /etc/passbolt/passbolt.php , and without problems, then I tried to access with a user of passbolt through the mail as you say, that has not gone, if I enter with the user that is in /etc/passbolt/passbolt.php could see all the passwords?
I have only copied the database, I can access the files on the dead computer, but I could not do the migration well because I could no longer access passbolt and I had no backup, only the files.
I have tried to investigate and I am not able to reproduce the issues, here is what I have done:
Create a server on Debian 12
a. Create 3 users
b. Create 3 groups
c. Create 5-10 resources per user
d. Create 2-4 folders per users
e. Share some folders with groups, individual users
d. Share some secrets with groups, individual users
I did a mysqdump of the database
I created a Ubuntu 22.04 server
Installed a fresh instance on it
a. Completing the installation through the server wizard
b. Completing the installtion through /install browser page
c. Completing the admin account confiugration
Imported the mysqldump.sql to the current database using mysql -u PASSBOLT_DATABASE_USER -p PASSBOLT_DATABASE < mysqldump.sql
Ensuring that the credentials in /etc/passbolt/passbolt.php are correct
The errors I have is mostly due to the difference between the server keys that prevent some decryption with what has been encrypted with the old server key (e.g. SMTP → [FAIL] SMTP Setting errors: The OpenPGP server key cannot be used to decrypt the SMTP settings stored in database. To fix this problem, you need to configure the SMTP server again. Decryption failed. decrypt failed
I also tried to update the database credentials from /etc/passbolt/passbolt.php with wrong credentials OR wrong database name and I am not able to have the same error message, here is mine
WRONG database name:
2024-05-23 10:34:51 error: [Cake\Database\Exception\MissingConnectionException] Connection to Mysql could not be established: SQLSTATE[HY000] [1044] Access denied for user 'passboltadmin'@'localhost' to database 'passsboltdb' in /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Database/Driver.php on line 144
Caused by: [PDOException] SQLSTATE[HY000] [1044] Access denied for user 'passboltadmin'@'localhost' to database 'passsboltdb' in /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Database/Driver.php on line 136
2024-05-23 10:34:51 error: Could not connect to Database.
WRONG credentials:
2024-05-23 10:36:00 error: [Cake\Database\Exception\MissingConnectionException] Connection to Mysql could not be established: SQLSTATE[HY000] [1045] Access denied for user 'passboltadmin'@'localhost' (using password: YES) in /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Database/Driver.php on line 144
Caused by: [PDOException] SQLSTATE[HY000] [1045] Access denied for user 'passboltadmin'@'localhost' (using password: YES) in /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Database/Driver.php on line 136
2024-05-23 10:36:01 error: Could not connect to Database.
This is why I think that the issues may be somewhere else, it might be not enough permissions.
From the MySQL CLI, could you run:
GRANT ALL PRIVILEGES ON databaseName.* TO ‘DATABASE_USERNAME’@‘’ IDENTIFIED BY ‘USER_DATABASE_PASSWORD’;
FLUSH PRIVILEGES;
Also, if the issues persist, could you share some logs from MySQL?
Hello @Termindiego25 , thanks for hoping in it looks like @quetebe have been able to go further on the issues based on his screenshot I am able to see the mysql CLI
Yes sorry, it’s me, I managed to start the mysql server and give it more space, but as I got another problem I opened another post, I do not know if it is what I should have done, the truth is that this is being a nightmare, sorry for the inconvenience.
To give me that error what I did was to change the database of the new machine for the old one, which was called the same and all, I just did that, I opened the mysql folder and replaced the database files QuetebePassboltdb, I do not know if I should have done something else to make it work well or something, I have a snapshot of the machine before I made the change, in case you think it’s better if I go back and do it another way, I tried to do what you told me but I get a syntax error, I put GRANT ALL PRIVILEGES ON QuetebePassboltdb TO ‘user@mail’ IDENTIFIED BY ‘password’;
Using the passbolt user with his password.
According to what I see in your error messages, I’m pretty sure you copy pasted the raw files from the old computer to the new one but you didn’t run the command @antony showed right?
In that case, did you follow the link mentioned in the error message to help recovering the database? Unfortunatelly Mysql or MariaDB can’t just be copy pasted like that, there are extra procedure to be done.
Sorry if I don’t express myself well sometimes, English is not my native language, yes, that’s what I did, I just copied and pasted the database after doing a clean install, but because I couldn’t do a backup or anything because I couldn’t access the computer where the database came from, as I mentioned before, I have a snapshot from before I pasted the database and replaced it with the blank one, if necessary or easier I can go back before replacing it, but the problem would be the same, no?
The problem I had was that the computer where I had passbolt died, the system was damaged and it was impossible to start it, so I could not make a backup, the only thing I could do is save the files, including the database. What I did was on a new computer, do a clean install of passbolt with the same users and settings I had before, but I need to recover the passwords I had. I have the database of the dead computer as I said and all the files, so if I restore the snapshot as you say, what I understand, is that if I make a backup will do it from the empty database, the new one I created, but the one I need to restore is the computer that does not start and of which I only have the raw data, as I say I can access all the data but not start it.
If I try to make the backup as I have the system now I get the following error “Please ensure on MySQL that the user has PROCESS privileges”.
So just to be completely clear, the snapshot is not of the old working instance, but is of the new empty one?
Unfortunately saving just the files of the database from a crashed system is not the way to restore them. Did you have any backups from when it was running that are a bit older?