Running wordpress with bedrock+docker using webdevops/php-apache:8.2-alpine
and mariadb:10.4
Recently I am getting errors when trying to export/import the database through wp-cli.
Not sure what could have changed in the environment, have not made any changes to the db image or php/apache image.
WordPress version: 6.7.1
wp-cli version: 2.11.0
Trying to export:
5cb38ad01152:/app# wp db export wp-backup.sql --allow-root
mysqldump: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb-dump' instead
mysqldump: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb-dump' instead
mysqldump: Got error: 2026: "TLS/SSL error: SSL is required, but the server does not support it" when trying to connect
This can be solved by appending --ssl=0
5cb38ad01152:/app# wp db export wp-backup.sql --allow-root --ssl=0
mysqldump: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb-dump' instead
mysqldump: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb-dump' instead
Success: Exported to 'wp-backup.sql'.
But this does not work for import:
5cb38ad01152:/app# wp db import wp-backup.sql --network --allow-root
Error: Failed to get current SQL modes. Reason: mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead
ERROR 2026 (HY000): TLS/SSL error: SSL is required, but the server does not support it
5cb38ad01152:/app# wp db import wp-backup.sql --network --allow-root --ssl=0
Error: Failed to get current SQL modes. Reason: mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead
ERROR 2026 (HY000): TLS/SSL error: SSL is required, but the server does not support it
landline-swan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2