I need to migrate a database that was managed by someone who left the company.
The source server is MariaDB 1:10.5.5, the destination MariaDB 1:10.5.19.
The existing backup scripts use the following command:
mysqldump --max_allowed_packet=5120M -u root -p my_db > my_dump.sql
Both servers have the following settings
In /etc/mysql/conf.d/mysqldump.cnf:
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
In /etc/mysql/mariadb.conf.d/50-server.cnf:
max_allowed_packet=524288000
(-> = 500MB)
I don't know why but there must be a reason it was set like this.
I don't understand why using "--max_allowed_packet=5120M" on the command line.
It doesn't fit with the server settings and the MySQL documentation says that the mysqldump max_allowed_packet value must not exceed the server value and that the protocol has a max value of 1G.
If I run "mysqldump --max_allowed_packet=5120M -u root -p my_db > my_dump.sql" manually,
I get this warning:
"Warning: option 'max_allowed_packet': unsigned value 5368709120 adjusted to 2147483648"
How can I dump this database safely? I need to be sure I don't loose any data and that it will import in the new server.
Do I have to use "max_allowed_packet"? Maybe with the same value as the server (524288000) ?
Thanks!