• 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 Restore MySQL-Server and Plesk Onyx

Dukemaster

Regular Pleskian
Hi,
today I made Update to Onyx, then I finished in 5 minutes a successful Update to MySQL 5.6 on Ubuntu 14.04 from this great tutorial. But I forgot to update my.cnf as the last step. Wouldn't be bad. In server components version 5.6 was shown, only not in the localhost in Tools & Settings - Databases.
I badly decided to upgrade to 5.7 and update my.cnf at the end of this upgrade.
But this Upgrade failed absolutely. Plesk Panel is a white side with support links.
I made also a complete backup (Section Backup in Tools & settings) before upgrading to 5.6 and downloaded it to my local computer.
Questions are:
Is it possible to restore any kind of Plesk/PSA backups, or perhaps only the MySQL-backup?
What can I do now?
Do I have chances to bring it to good end, or is everything broken now and I have to reinitialize server for the last time?


Lots of greets
 
Last edited:
Hi Dukemaster,

In server components version 5.6 was shown, only not in the localhost in Tools & Settings - Databases.
Easy fix: Just go to "HOME > Tools & Settings > Database Servers" and go to the database specific settings by clicking at the corresponding hostname. A second setting page will open, where you just have to confirm all ( without changes! ) with another click on OK.
Actually, this is rather a ( minor ) display issue, which appears only in case of version settings, or when you change MySQL to MariaDB for example. It doesn't conflict in any way with Plesk at all.

To restore your previous my.cnf, you should consider to inspect your folder "/etc/mysql" a bit better. You should have a file named "/etc/mysql/my.cnf.migrated" or/and "/etc/mysql/my.cnf.migrated.bak" after you upgraded to another MySQL version. ;)


To restore a "mysql" - database - backup, pls. follow: => How to backup/restore a Plesk database dump?
 
Would be, dear @UFHH01, wish it so much. I have no access to Plesk. Bash gives these results:
root@:~# plesk db psa < psa.sql
-bash: psa.sql: No such file or directory
root@:~# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin -e"DROP DATABASE psa;"
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

I have only the possibility to do it over command line. In real I think there is no psa/plesk database anymore.
Thanks for it, perhaps another way to make it. I know Plesk makes so much good backups in all sections. There must be a way.
Greets
Just made update/upgrade as a chance with this output:
(Reading database ... 124243 files and directories currently installed.)
:~# apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
php5-mysqlnd
0 upgraded, 0 newly installed, 1 to remove and 3 not upgraded.
After this operation, 544 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 124243 files and directories currently installed.)
php5_invoke prerm: Disable module mysqlnd for cli SAPI
php5_invoke prerm: Disable module mysqlnd for apache2 SAPI
php5_invoke prerm: Disable module mysqlnd for fpm SAPI
php5_invoke prerm: Disable module mysqlnd for cgi SAPI
php5_invoke prerm: Disable module mysql for cli SAPI
php5_invoke prerm: Disable module mysql for apache2 SAPI
php5_invoke prerm: Disable module mysql for fpm SAPI
php5_invoke prerm: Disable module mysql for cgi SAPI
php5_invoke prerm: Disable module mysqli for cli SAPI
php5_invoke prerm: Disable module mysqli for apache2 SAPI
php5_invoke prerm: Disable module mysqli for fpm SAPI
php5_invoke prerm: Disable module mysqli for cgi SAPI
php5_invoke prerm: Disable module pdo_mysql for cli SAPI
php5_invoke prerm: Disable module pdo_mysql for apache2 SAPI
php5_invoke prerm: Disable module pdo_mysql for fpm SAPI
php5_invoke prerm: Disable module pdo_mysql for cgi SAPI
Processing triggers for libapache2-mod-php5 (5.5.9+dfsg-1ubuntu4.21) ...
Processing triggers for php5-fpm (5.5.9+dfsg-1ubuntu4.21) ...
php5-fpm start/running, process 9871

The following packages will be REMOVED:
php5-mysqlnd

Seems as if PHP5 is also away.
Perhaps installing Plesk Onyx over the old one, everything new or parts of it @UFHH01 ?
 

Attachments

  • fehler-x.jpg
    fehler-x.jpg
    627 KB · Views: 10
Last edited:
Hi Dukemaster,

messages like
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
indicate, that your current mydql - server isn't running.
Pls. CHECK the status first with for example:

service mysql status

or/and

ps aux | grep mysql

You will never be able to connect to your mysql server, if there is no running mysql - process. ;)

Second ( and not related to your MySQL - issue at all! ): php5-mysqlnd is a MODULE for your installed php5 - version. If you conclude, that your php5 - package is "away", only because YOU removed a php5 - module
:~# apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
php5-mysqlnd
0 upgraded, 0 newly installed, 1 to remove and 3 not upgraded.
After this operation, 544 kB disk space will be freed.
Do you want to continue? [Y/n] Y
... pls. consider to CHECK installed php - packages with the example command: "apt-cache policy php5" or "apt-cache policy php".




I have to mention again, that your issue/thread is not related to Plesk products or it's components. Pls. consider to open such threads at: => Home > Forum > General Discussion > Open Topics

Pls. note as well: You should never mix threads and the corresponding topics ( described as well in the initial starting post of a thread ) with different issues, if these issues are not at all related to the initial issue. Your php5 - module - issue has got nothing to with MySQL.
 
Hi @UFHH01
service mysql status
~# service mysql status
* MySQL Community Server 5.7.17 is not running

:~# ps aux | grep mysql
root@:~# apt-cache policy php5
php5:
Installed: (none)
Candidate: 5.5.9+dfsg-1ubuntu4.21
Version table:
5.5.9+dfsg-1ubuntu4.21 0
500 Index of /linux/distributions/ubuntu/ubuntu/ trusty-updates/main amd64 Packages
500 Index of /linux/distributions/ubuntu/ubuntu/ trusty-security/main amd64 Packages
5.5.9+dfsg-1ubuntu4 0
500 Index of /linux/distributions/ubuntu/ubuntu/ trusty/main amd64 Packages
root@:~# ^C
To second...yes you're right, but I did it because it was suggested like normal removes of real unnecessary packages and files.
Thanks a lot for your great help!
Greets
 
Hi Dukemaster,

~# service mysql status
* MySQL Community Server 5.7.17 is not running

Consider to inspect your mysql - logs ( /var/log/mysql ) , in order to investigate, why the mysql - server isn't running.
Start the service over your command line ( "service mysql start" ) and copy&paste possible errors/issues/problems from the command line, if you experience any of them and would like help with your investigations - again, pls. consider to inspect your mysql - logs afterwards and include possible errors/issues/problems in your next post, together with your errors/issues/problems from the command line. ;)
 
Hi @UFHH01,
First .txt-file includes the error.log with the period of time as I today afternoon upgraded MySQL 5.6 to 5.7, could be also the end of installation of 5.6.
Before I now started mysql service.
Don't remember the exact minutes from todays afternoon, because I did so much since 20 hours.
Here ist starting service mysql part over command line :
:~# service mysql start
No directory, logging in with HOME=/
...............................^C
root@:~# service mysql stop
* MySQL Community Server 5.7.17 is already stopped
root@:~# service mysql start
No directory, logging in with HOME=/
.................................................................................................................................................................................... * MySQL Community Server 5.7.17 did not start. Please check logs for more details.
root@:~# ^C
/etc/init.d/mysqld start
-bash: /etc/init.d/mysqld: No such file or directory




Nothing new here in error.log. Perhaps in another error.log (mysql)?
Here the end of error.log as I tried update+upgrade few hours ago:
2017-04-04T16:23:14.685487Z 0 [Note] InnoDB: Buffer pool(s) load completed at 170404 18:23:14
2017-04-04T16:23:14.688142Z 0 [Warning] System table 'plugin' is expected to be transactional.
2017-04-04T16:23:14.688394Z 0 [ERROR] unknown variable 'key_buffer=16M'
2017-04-04T16:23:14.688418Z 0 [ERROR] Aborting

2017-04-04T16:23:14.688435Z 0 [Note] Binlog end
2017-04-04T16:23:14.688519Z 0 [Note] Shutting down plugin 'ngram'
2017-04-04T16:23:14.688538Z 0 [Note] Shutting down plugin 'partition'
2017-04-04T16:23:14.688548Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2017-04-04T16:23:14.688561Z 0 [Note] Shutting down plugin 'ARCHIVE'
2017-04-04T16:23:14.688573Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2017-04-04T16:23:14.688668Z 0 [Note] Shutting down plugin 'CSV'
2017-04-04T16:23:14.688681Z 0 [Note] Shutting down plugin 'MEMORY'

..................... cutted out..............

2017-04-04T19:48:06.537322Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2017-04-04T19:48:06.537384Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
2017-04-04T19:48:06.693984Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-04-04T19:48:06.695691Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.17) starting as process 11411 ...
2017-04-04T19:48:06.699537Z 0 [Note] InnoDB: PUNCH HOLE support available
2017-04-04T19:48:06.699589Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-04-04T19:48:06.699611Z 0 [Note] InnoDB: Uses event mutexes
2017-04-04T19:48:06.699621Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2017-04-04T19:48:06.699645Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-04-04T19:48:06.699658Z 0 [Note] InnoDB: Using Linux native AIO
2017-04-04T19:48:06.699947Z 0 [Note] InnoDB: Number of pools: 1
2017-04-04T19:48:06.700082Z 0 [Note] InnoDB: Not using CPU crc32 instructions
2017-04-04T19:48:06.701629Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2017-04-04T19:48:06.711446Z 0 [Note] InnoDB: Completed initialization of buffer pool
2017-04-04T19:48:06.713901Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2017-04-04T19:48:06.726194Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2017-04-04T19:48:06.777091Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2017-04-04T19:48:06.777223Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2017-04-04T19:48:06.911268Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2017-04-04T19:48:06.914817Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2017-04-04T19:48:06.914913Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2017-04-04T19:48:06.916817Z 0 [Note] InnoDB: Waiting for purge to start
2017-04-04T19:48:06.967188Z 0 [Note] InnoDB: 5.7.17 started; log sequence number 8473647
2017-04-04T19:48:06.968445Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2017-04-04T19:48:06.969265Z 0 [Note] Plugin 'FEDERATED' is disabled.
2017-04-04T19:48:06.971143Z 0 [Note] InnoDB: Buffer pool(s) load completed at 170404 21:48:06
2017-04-04T19:48:06.979901Z 0 [Warning] System table 'plugin' is expected to be transactional.
2017-04-04T19:48:06.980156Z 0 [ERROR] unknown variable 'key_buffer=16M'
2017-04-04T19:48:06.980176Z 0 [ERROR] Aborting

2017-04-04T19:48:06.980191Z 0 [Note] Binlog end
2017-04-04T19:48:06.980292Z 0 [Note] Shutting down plugin 'ngram'
2017-04-04T19:48:06.980308Z 0 [Note] Shutting down plugin 'partition'
2017-04-04T19:48:06.980318Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2017-04-04T19:48:06.980329Z 0 [Note] Shutting down plugin 'ARCHIVE'
2017-04-04T19:48:06.980338Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2017-04-04T19:48:06.980430Z 0 [Note] Shutting down plugin 'CSV'
2017-04-04T19:48:06.980450Z 0 [Note] Shutting down plugin 'MEMORY'
2017-04-04T19:48:06.980461Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
Greets
 

Attachments

  • var-log-error.log.txt
    33.9 KB · Views: 1
Last edited:
Hi Dukemaster,

You stated
Nothing new here in error.log.
and in the logs we can see:
2017-04-04T19:48:06.980156Z 0 [ERROR] unknown variable 'key_buffer=16M'
2017-04-04T19:48:06.980176Z 0 [ERROR] Aborting

Pls. don't get this wrong, but you seem to be overwhelmed with the server administration task to upgrade your system and software packages. Pls. consider to contact the Plesk Support ( => Professional Services - Plesk / "Upgrade Service (Per Server)" ), or consider to contact an experienced linux server administrator in order to help you.
 
I posted exactly this because I know that this is the problem. ;)
Thanks for help and investigating the problem.
I decided to reinstall the server. The problem occured because I forgot to update my.cnf after updating to 5.6.
Moved too fast to next upgrade...
Lots of greets
 
Hi @UFHH01
successfully installed MySQL 5.6
want to say thank you at all for helping. This wasn't wasted time, because everyone can learn from it. Yesterday I was tired after managing server over 30 hours withou sleeping.
Now on a new system by applying to new my.cnf it worked ! ! ! (I did it alone without help of anybody :))
You can see it on the screen.
I already have a question to the Upgrade.
There are also my installation process and the mysql error.log.
There are some errors. I think perhaps they are normal (Until now I have no webspace/subscription made).
If you want and like perhaps, you can tell if they are normal or if something is wrong and I have to solve it.
But no problem if you don't like. I would understand.

Lots of greets for amazing plesk support
5 Thumbs up
:):):):):)

Upgrade MySQL to 5.6.jpg
 

Attachments

  • MySQL-5.6-Installation.txt
    13.3 KB · Views: 21
  • MySQL-5.6-Update--var-log-mysqlerror.log.txt
    56.8 KB · Views: 9
Back
Top