Articles in this section

Database import fails: There can be only one TIMESTAMP column

Plesk for Linux kb: technical ext: migrator ABT: Group B

Applicable to:

  • Plesk for Linux

Symptoms

The database import or migration either using Plesk interface or CLI utility fails:

PLESK_ERROR: Traceback (most recent call last): File "/usr/local/psa/admin/sbin/dbbackup", line 6, in <module> File "/usr/local/psa/lib/modules/python/dbbackup/dbbackup.py", line 99, in main restore(options, password) File "/usr/local/psa/lib/modules/python/dbbackup/dbbackup.py", line 88, in restore raise Exception("program 'mysql' finished with non-zero exit code: %d" % p.returncode) Exception: program 'mysql' finished with non-zero exit code: 1

# mysql -u USERNAME -p***** DATABASENAME < MYSQL_DATABASE.sql
ERROR 1293 (HY000) at line 52700: Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
Traceback (most recent call last): File "/usr/local/psa/admin/sbin/dbbackup", line 6, in <module> File "/usr/local/psa/lib/modules/python/dbbackup/dbbackup.py", line 99, in main restore(options, password) File "/usr/local/psa/lib/modules/python/dbbackup/dbbackup.py", line 88, in restore raise Exception("program 'mysql' finished with non-zero exit code: %d" % p.returncode) Exception: program 'mysql' finished with non-zero exit code: 1

Cause

The issue is caused by legacy code in MySQL/MariaDB. It has been resolved in MariaDB 10.0 and MySQL 5.6.5.

Resolution

To resolve the issue an upgrade of MySQL/MariaDB must be performed.

Please, refer to the article How to upgrade MySQL 5.5 to 5.6/5.7 on Linux.

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.