Unable to export database in Plesk 12.5 if MySQL 5.7 Community Server is installed

Created:

2017-02-15 00:08:12 UTC

Modified:

2017-08-08 13:42:32 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to export database in Plesk 12.5 if MySQL 5.7 Community Server is installed

Applicable to:

  • Plesk 12.5 for Linux

Symptoms

  • When trying to export database dump at Domains > example.com > Databases > example_db > Export Dump , the following error is shown:

    Unable to export a dump of example_db:
    mysqldump: [ERROR] unknown option '--database'
    Traceback (most recent call last):
    File "/usr/local/psa/admin/sbin/dbbackup", line 6, in <module> dbbackup.main()
    File "/usr/local/psa/lib/modules/python/dbbackup/dbbackup.py", line 98, in main backup(options, password)
    File "/usr/local/psa/lib/modules/python/dbbackup/dbbackup.py", line 69, in backup
    raise Exception("program 'mysqldump' finished with non-zero exit code: %d", p1.returncode)
    Exception: ("program 'mysqldump' finished with non-zero exit code: %d", 2)
  • MySQL 5.7 Community Server is installed on the server:

    # mysql -V
    mysql Ver 14.14 Distrib 5.7.17, for Linux (x86_64) using EditLine wrapper
    # plesk db
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 1234
    Server version: 5.7.17 MySQL Community Server (GPL)

Cause

MySQL 5.7 Community Server is not supported by Plesk 12.5.

Resolution

Downgrade MySQL to the version 5.6. For reference, use the official MySQL documentation article on downgrading https://dev.mysql.com/doc/refman/5.7/en/downgrading.html .

If MySQL downgrading is not possible, the following workarounds could be used to export database dumps:

  1. The Export function in phpMyAdmin.
  2. CLI utility mysqldump :

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin DATABASE_NAME > FILE_NAME.sql
    
Have more questions? Submit a request
Please sign in to leave a comment.