• 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

Resolved Updating Problems - MySQL Configuration appears to be stopping update

NateWon

Basic Pleskian
Hello,

I'm trying to update Plesk Onyx 17.0.17 to Update #53 is available. or "Upgrade to Plesk Onyx 17.8.11 is available."
But am having some problems. All Packages are up to date, websites etc are running fine, but I think something with the mySQL configuration is breaking the update.

"
Failed to update Plesk. To close this message, click here.
Upgrade failed. To remove this notice, remove the file /var/lock/parallels-panel-upgrade-failure.flag from the server. Repair the failed upgrade or installation.
"

Errors (Cut from the Log)

[2018-07-21 19:55:42.788319] Installation started in background

......

Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up mysql-server-5.7 (5.7.22-0ubuntu0.16.04.1) ...

update-alternatives: warning: forcing reinstallation of alternative /etc/mysql/mysql.cnf because link group my.cnf is broken
update-alternatives: warning: not replacing /etc/mysql/my.cnf with a link

Checking if update is needed.
Checking server version.
Running queries to upgrade MySQL server.
Checking system database.
....
ALL OK through here.
...

Checking databases.
Failed to run query "ALTER DATABASE `#mysql50#mysql.bak` UPGRADE DATA DIRECTORY NAME"
Error: Incorrect database name '#mysql50#mysql.bak'

#mysql50#mysql.bak FAILED
...
Checks Databases .... ...
...

Error occurred: Error during call to mysql_check.
mysql_upgrade failed with exit status 4
dpkg: error processing package mysql-server-5.7 (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.7; however:
Package mysql-server-5.7 is not configured yet.

dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
mysql-server-5.7
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
Plesk is down, performing full restart.
Starting sw_engine service... done
Starting sw_cp_server service... already started
Starting mysql service... already started
Checking whether IP reconfiguration is needed...

#dpkg -l | grep mysql-server shows

iU mysql-server 5.7.22-0ubuntu0.16.04.1 all MySQL database server (metapackage depending on the latest version)
iF mysql-server-5.7 5.7.22-0ubuntu0.16.04.1 amd64 MySQL database server binaries and system database setup

ii mysql-server-core-5.7 5.7.22-0ubuntu0.16.04.1 amd64 MySQL database server binaries
ii plesk-mysql-server 17.0.17-ubuntu16.04.build1700161028.14 amd64 Plesk Onyx v17.0.17 MySQL server dependency package

As I understand it iU and iF are incorrect, Im not sure how to fix this?

I also have a symlink in place for the data directories, not sure if that would be related

lrwxrwxrwx 1 mysql mysql 11 Feb 15 2017 /var/lib/mysql -> /data/mysql/

# /usr/sbin/mysqld --verbose --help | grep -A 1 "Default options"
Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf



Im pretty sure this is related to mySQL, installing packages would work but would through a plesk error

ERROR: Zend_Db_Adapter_Exception: SQLSTATE[HY000] [2002] No such file or directory (Abstract.php:144)<br />
<br><a href='Search results – Plesk Help Center' target='_blank'>Search for related Knowledge Base articles</a><script></script><p>ERROR: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2002] No such file or directory' in /opt/psa/admin/externals/Zend/Db/Adapter/Pdo/Abstract.php:129
Stack trace:
#0 /opt/psa/admin/externals/Zend/Db/Adapter/Pdo/Abstract.php(129): PDO->__construct('mysql:dbname=ps...', 'admin', '$AES-128-CBC$lk...', Array)
#1 /opt/psa/admin/externals/Zend/Db/Adapter/Pdo/Mysql.php(111): Zend_Db_Adapter_Pdo_Abstract->_connect()
#2 /opt/psa/admin/externals/Zend/Db/Adapter/Abstract.php(460): Zend_Db_Adapter_Pdo_Mysql->_connect()
#3 /opt/psa/admin/externals/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('select param, v...', Array)
#4 /opt/psa/admin/plib/Db/Adapter/Pdo/Mysql.php(30): Zend_Db_Adapter_Pdo_Abstract->query('select param, v...', Array)
#5 /opt/psa/admin/plib/db.php(36): Db_Adapter_Pdo_Mysql->query('select param, v...')
#6 /opt/psa/admin/plib/db.php(212): db_query('select param, v...', false)
#7 /opt/psa/admin/plib/Plesk/Mode.php(423): get_param('disable_provisi...')
#8 /opt/psa/admin (Abstract.php:144)<br><br><a href='Search results – Plesk Help Center' target='_blank'>Search for related Knowledge Base articles</a></p>


Server has plenty of space for mySQL and MySQL runs, installs databases, phpMyAdmin works fine etc etc.
Is mySQL Version 5.7.22

Any suggestions or confirmation of what I should do. I suspect it could be my data directory symlink but sure I got that information from a plesk tutorial, however this appears to have been updated to different details?
How to change a default MySQL directory /var/lib/mysql to another on Plesk server
Happy to update the mySQL Dir but would appreciate some input.

Thank you
 
Was an easy change to move from using the SymLink to changing the configuration - the update also wiped out the mail configuration backups made this easy to restore. Waiting until after hours to run the updater again and see if the update resolves the issue.
 
So finally got around to completing the upgrade, there where two errors.
One the Symlink setup, then another which was stopping the upgrade where I had backed up a file to the mysql data directory, the checks on the database for upgrade where breaking because the system wasn't finding a database definition in the folder simply moved the directory and all worked as it should.
 
Back
Top