• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Ahsay MySQL backup fails after upgrade to Onyx

GlennT

Basic Pleskian
Hi there,

I recently upgraded from Plesk 12 to Plesk 17.x on Windows and now Ahsay Backup fails with invalid password. In plesk 12, the password was passed in plain text but with Onyx, we now need to provide the encrypted password to Ahsay. This works fine in our Linux servers.

I tried running this command:

plesk sbin psadb --get-admin-password

The password displayed does not work. I tried changing the Plesk admin password and it was strange because after I updated password, I ran the above command again and it showed me the same encrypted password as before. It should have changed.

I then tried 'plesk db' at command line:

select host, user, authentication_string from mysql.user where user = 'admin';

This produced a long alpha-numeric number which also failed with incorrect password error.

Does anyone know how I can find the correct encrypted password?

thx
G
 
Hello,
indeed, in Plesk Onyx we have splitted Plesk admin password and password for Plesk MySQL database.
plesk sbin psadb --get-admin-password returns plain password for Plesk MySQL database and you cannot use it for logging in Plesk panel, and vice versa, if you are changing password for admin in Plesk, you are changing only password for control panel, and not changing MySQL database password.

If you are trying to backup Plesk MySQL database then you need to specify login = "admin", password = "<password_returned_by_psadb_get_admin_password>", port = 8306

I don't understand why you "need to provide the encrypted password to Ahsay"? Can you please explain why is that?
 
Hi Pavel,

That's just the way it works now. We used to be able to use unencrypted password in Ahsay when backing up all databases on Plesk 12 but after upgrade to Plesk 17 Windows, the password began to fail. With Plesk 17 we now need to the use encrypted 'admin' password so something has changed with Plesk not Ahsay. The plain text password generates a validation error and it's the same on Linux Plesk 17 as well.

Using admin and password generated by plesk sbin psadb --get-admin-password also produced validation error.

Note that we are backing up ALL dbs on Plesk for Windows.

Can you provide me with exact command I need to use on Windows command line to get the encrypted admin password after entering 'plesk db' or detail whatever method I need to use to get the password?

thx
G
 
Hello,

> "With Plesk 17 we now need to the use encrypted 'admin' password so something has changed with Plesk not Ahsay."
what exactly do you mean by "encrypted admin password"? is this HASH of password stored in MySQL? or what?

> The plain text password generates a validation error and it's the same on Linux Plesk 17 as well.
Can you please show what exactly validation error you have?

> Note that we are backing up ALL dbs on Plesk for Windows.
In Plesk for Windows we have 2 database instances: one is on port 3306 where all databases created by Plesk are stored, and second is on port 8306 where Plesk stores its data. By saying "ALL dbs" you mean all databases inside standard instance on port 3306?

> Using admin and password generated by plesk sbin psadb --get-admin-password also produced validation error.
As I expalined above, password returned by this command is for user 'admin' inside database instance on port 8306, where Plesk stores its database. Have you configured Ahsay backup to use this password for connecting to proper instance?

> so something has changed with Plesk not Ahsay
In Plesk 17 we have upgraded MySQL server to new version as well. Is it possible that problem with connection to new version of MySQL from Ahsay is the root cause?


So, we have MySQL instance, we have login and plain password for that instance. I still don't understand why Ahsay cannot use the same credentials to backup properly? From technical point of view, we had one password, changed it to another during upgrade and nothing more.
 
Hi Pavel,

Sorry for delay following up on this. It's been busy lately.

1. I don't know how Plesk encrypts the password. Can you tell me? All i know is that using results from this command fails:

Using admin as username and password generated by running plesk sbin psadb --get-admin-password also produced error:

MySQL is either not started or not installed on this computer. Error = "Invalid authorization specification, message from server: "Access denied for user 'admin'@'localhost' (using
password: YES)""


2. I am attempting to backup ALL client databases running on port 3306.

3. Should I be using Port 8306 to backup ALL databases running on port 3306?

4. No, Ahsay is working fine on our Linux servers using newer versions of MySQL or latest version of MariaDB. Ahsay is also working fine with Plesk Onyx however we had to extract the encrypted Plesk Admin password from the Linux servers for Ahsay to work after upgrading from Plesk 12 to Plesk 17.

I need to get this working again so I have backups and we were able to figure this out on our own with Linux servers but something is different with Windows Plesk.

Thanks
G
 
1. You cannot use "admin" and password received from "plesk sbin psadb --get-admin-password" to access MySQL database on port 3306. (You can do similar thing on Linux, but you cannot use it on Windows). This is because on Windows we have separate instance of MySQL for Plesk and this password is for that separate instance on port 8306.
2. Client's MySQL database server (which is on port 3306) is registered in Plesk automatically with some random password. You cannot get it, but you can change it to the one you know. You can do this using comand line tools or manually in UI:
Tools&Settings->Database Servers->(choose MySQL database in the list on "localhost" which is on port 3306), select it, and choose "Change password"
upload_2019-1-10_9-55-13.png
Here you can specify any randomly generated password (you will know and have written down).
After that you can connect to MySQL instance on port 3306 using default login "admin" and password you just generated and set up.
I hope Ahsay will be able to connect to this instance after that.

NOTE: this new password and password received from "plesk sbin psadb --get-admin-password" will be DIFFERENT. This is by design, this is ok, and should be like that. These password are for different database servers located on different ports.

3. No, you need to know login and password from server located at 3306 port. You don't need to use port 8306 for that.

4. I still don't understand why you have started expereincing some problems after upgrade from Plesk 12 for Windows to Plesk 17 for Windows. In Plesk 12 for Windows, password for database server at port 3306 was stored the same way I described above and encrypted the same way.
Difference was that password of "admin" in Plesk panel was the same as password for database server at port 8306. But this is not your case anyway.
 
Back
Top