mirror of
https://github.com/cloudpanel-io/cloudpanel-ce.git
synced 2026-04-05 20:31:58 +02:00
clpctl db:import fails when using mariadb 11.4 #124
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @arnelap on 2/13/2025
CloudPanel version(s) affected
v2.5.0
Description
clpctl db:import --databaseName=thedatabase --file=import.sql.zip
Command " : /usr/bin/sudo /usr/bin/setfacl -m u:www-data:--- /usr/bin/sh;/usr/bin/sudo chown www-data:www-data '/tmp/.xxxxxxxxxx;/usr/bin/sudo /bin/bash -c "/usr/bin/cat '/home/xxxxx/import.sql.zip'" | /usr/bin/sudo -u www-data /bin/bash -c "/usr/bin/mysql --defaults-extra-file='/tmp/.xxxxx' -f -h'127.0.0.1' -u'root' -P'3306' 'thedatabase'"" failed, error message: /usr/bin/mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead
ERROR: ASCII '\0' appeared in the statement, but this is not allowed unless option --binary-mode is enabled and mysql is run in non-interactive mode. Set --binary-mode to 1 if ASCII '\0' is expected. Query: 'PK'.
/usr/bin/cat: write error: Broken pipe
Operating System
Ubuntu 24.04
How to reproduce
Install CloudPanel with latest MariaDB 11.4
curl -sS https://installer.cloudpanel.io/ce/v2/install.sh -o install.sh;
echo "a3ba69a8102345127b4ae0e28cfe89daca675cbc63cd39225133cdd2fa02ad36 install.sh" |
sha256sum -c && sudo CLOUD=hetzner DB_ENGINE=MARIADB_11.4 bash install.sh
create a site
create a database for the site
login to ssh and run clpctl db:import --databaseName=... --file=...
Possible Solution
change command to use /usr/bin/mariadb ?
Additional Context
No response