• 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
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

Resolved mysql upgrade

Stephan Griesel

Basic Pleskian
I have followed this guide to upgrade MySQL:

All looks good but the last step does not want to complete:
7. Upgrade MySQL databases:
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin​

This is the message I get when trying to run this command:
sudo MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin
cat: /etc/psa/.psa.shadow: Permission denied
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Error: Failed while fetching Server version! Could be due to unauthorized access.
FATAL ERROR: Upgrade failed​
 
Hi Stephan Griesel,

pls. note, that the given example command contains several commands, while your "sudo" only covers one of them. ;) If you desire to use "sudo" ( even that you should be logged in as user "root", which makes the usage obsolete ), then pls. use a different example command, as for example:

Code:
MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin | sudo -s
 
Ah didnt see the 2 commands. Root user disabled, this user is in the root group. When I run the command without sudo it is not working. Also tried the command as suggested. Please see message below:
sudo] password for stephangriesel: cat: /etc/psa/.psa.shadow: Permission denied
Error: Failed while fetching Server version! Could be due to unauthorized access.
FATAL ERROR: Upgrade failed​
 
Hi Stephan Griesel,

I am not sure, why you don't enable "root" - access for this MySQL - upgrade... but o.k.:

Pls. use the command:
Code:
mysql_upgrade -uadmin -p
... where another prompt asks you to put in the password ( which is ENCRYPTED ) for the user "admin". If the user "stephangriesel" has sufficient rights, then it should be possible to use
Code:
cat /etc/psa/.psa.shadow
... to display the encrypted password on your command line, BEFORE you use the "mysql_upgrade" - command. ;) ( something like: "$AES-128-....." )
 
Back
Top