Perform a MariaDB Upgrade NOW. MariaDB Backup Compatibility Changed!
HTML-код
- Опубликовано: 28 ноя 2024
- This mariadb backup tutorial will walk you through why you should perform a mariadb upgrade as soon as possible.
This mariadb tutorial will tell you that in the previous versions of MariaDB Server, it was possible to generate a malicious MariaDB dump file which could execute malicious shell commands once the malicious file was invoked using the MariaDB client.
The good news is that this problem has been effectively squashed in MariaDB Server.
The MariaDB Server team introduced a --sandbox option that enables a sandbox mode for the current session until the session disconnects.
The sandbox mode prevents the execution of shell commands that can do damage.
Those using mariadb-dump to take sql database backups can also notice a command added to the very top of the backup file that triggers a sandbox mode:
/*!999999\- enable the sandbox mode */
This mariadb tutorial will tell you that this command introduces a compatibility problem in that older versions of MariaDB Server and all versions of MySQL Server simply don't understand this command and spew out errors.
In other words, if you've backed your database up from a newer version of MariaDB into an older one that doesn't contain this fix, you are likely to see an error. The same can be said about MySQL Server, too.
The versions of MariaDB Server that are affected by this bug are as follows:
MariaDB Server 10.5.25
MariaDB Server 10.6.18
MariaDB 10.11.8
MariaDB 11.0.6
MariaDB Server 11.1.5
MariaDB Server 11.2.4
MariaDB Server 11.4.2
If you are facing this problem, you have a couple of options you can use to avoid it from happening.
1) Import the dump using the secure client from the newest version of MariaDB Server or a version that has the change.
2) Use an older version of mariadb-dump to backup your database.
3) Remove the line outlining the sandbox mode from the backup file before importing it by using something like this command:
tail+2|mariadb
4) Remove the line outlining the MariaDB sandbox mode from the MariaDB backup file at database backup time using something like this command:
mariadb-dump|tail +2
If you've liked this mariadb tutorial make sure to subscribe to this sql tutorial channel for more MariaDB news, and until next time.
Music:
City Lights by tubebackr & HiLau
/ tubebackr
/ hilau
Creative Commons - Attribution-NoDerivs 3.0 Unported - CC BY-ND 3.0
Free Download / Stream: bit.ly/3UA7E5p
Music promoted by Audio Library bit.ly/3UC4bUb
#mariadb #mysql #database #sql