Not sure if this will help, but I had a similar issue on Ubuntu 20.04 when migrating my database out of Amazon's RDS Aurora (MySQL) to a MariaDB installation.
I exported the SQL and imported it into the MariaDB database with no problems.
The error appeared when trying to load RS. (It also appeared in the installation check in setup)
I resolved it by updating the mariadb-client on my server, which puts a new mysql client binary in /usr/bin
I installed it with the following command: sudo apt-get install -y mariadb-client
Best Regards