2

mysqldump: Ver 10.17 Distrib 10.5.4-MariaDB, for debian-linux-gnu (x86_64)

mysql: Ver 15.1 Distrib 10.5.4-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

Strange one here, the following command dumps the database as requested however, it replaces some varchar values with NULL; same detail if I run it on the host or within the container.

docker exec db-server_1 /bin/bash -c "mysqldump -u root -p'$MYSQL_ROOT_PASSWORD' $MYSQL_DATABASE" > $MYSQL_DATABASE.sql

If I export from phpMyAdmin, I get the expected dump, e.g:

(547, 3, 6, 'Mute.png', NULL),
(548, 3, 7, 'Mute.png', NULL),

If I use mysqldump, I get the following corresponding dump:

('547','3','6',NULL,NULL),
('548','3','7',NULL,NULL),

Not all rows are affected and I cannot see an obvious pattern why some are and some are not affected. Edit: Just noticed that Integer values are also changed to varchar - the table creation SQL created by mysqldump contains the correct (expected) type definitions for each field value though.

Has anyone experienced this before?

Shadow
  • 33,525
  • 10
  • 51
  • 64

0 Answers0