Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

Import or migration of MySQL databases fails in Plesk ERROR at line 1: Unknown command ‘/-‘.

 
backup restore migrationdatabaselinuxmariadbmysql

Symptoms

  • In Plesk, when trying to import a MariaDB dump from a different server, the following error appears:

    Unable to Import the dump:
    ERROR at line 1: Unknown command '/-'.

  • Migration of the subscription database fails with an error:

    Failed to copy content of database 'wp_1420'
    Migration tools tried to perform operation in 3 attempts: Command execution failed on the local server with non-zero exit code.
    command: mysql --defaults-file=/usr/local/psa/var/modules/panel-migrator/sessions/20240608085832/target-server/my_localhost_wp_1420.cnf -h localhost -P 3306 -uadmin wp_1420 < /usr/local/psa/var/modules/panel-migrator/sessions/20240608085832/target-server/db-dumps/wp_1420.sql
    exit code: 1
    stdout:
    stderr: ERROR at line 1: Unknown command '-'.

Cause

The SQL dumps generated by MariaDB on source server contains following on Line 1:

/*!999999- enable the sandbox mode */

This returns a syntax error when importing to older versions of MariaDB or MySQL on destination servers and therefore it breaks transfers between servers where the version is not identical. This is a MariaDB bug which will not be fixed since it was added because of CVE-2024-21096

Resolution

There is no direct way to disable the line for dumps made with Plesk.

The options are:

 

         Solution 1: Manually edit the dump.sql file and remove the line 1 from the MySQL dumps

 

Manually edit the dump.sql file and remove the line:

/*!999999- enable the sandbox mode */

    1. Login to server via SSH
    2. Manually remove the line 1 from the db-dumps that are placed in the directory using the following commands:

For example:

# sed --in-place  "1d" /usr/local/psa/var/modules/panel-migrator/sessions/SESSION_NAME/target-server/db-dumps/wp_1420.sql

Note: Replace the path in the above command with the actual path from the error in Plesk panel

      3. Restore that using the command from the migratory extension error:

For example:

# mysql --defaults-file=/usr/local/psa/var/modules/panel-migrator/sessions/20240608085832/target-server/my_localhost_wp_1420.cnf -h localhost -P 3306 -uadmin wp_1420 < /usr/local/psa/var/modules/panel-migrator/sessions/20240608085832/target-server/db-dumps/wp_1420.sql

Note: Replace the path in the above command with the actual path from the error in Plesk panel

 

Solution 2: Update MariaDB version on destination server to same as source server

 

Update destination server to have the same version as source, for example if source server has MariaDB 10.6.18 then upgrade the destination server MariaDB version to same.  How to upgrade MySQL 5.5 to 5.6/5.7 or MariaDB 5.5 to 10.x on Linux

 

 

 

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

How to Check Open Ports in Linux (Simple Commands & Tools)

Read More »

Linux Logs Explained

Read More »

MariaDB vs MongoDB: Which One To Choose?

Read More »
Knowledge Base

Migration or Site import fails: Unable to add database user: Database user name is invalid

Read More »

Unable to list APS applications: Search results could not be loaded at the moment

Read More »

MySQL Process List in Plesk does not work: Request failed with status code 500

Read More »

How to upgrade MySQL 5.5 to 5.6/5.7 or MariaDB 5.5 to 10.x on Linux

Read More »

Hosting Wiki

  • Server Redundancy
  • Linux Containers
  • PostgreSQL
  • AMP
  • Bare Metal Server
  • Backup
  • MySQL
  • Oracle VM Server
  • Server Virtualization Software
  • Windows Server
  • Linux
  • MSSQL
  • SQL
  • Plesk
  • SQL database
  • NoSQL Database
  • Web Server
  • DNS Server
  • SSH
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family