From bash script (Debian Bookworm) login and query to MariaDB

^Bart <[email protected]> Tue, 31 Oct 2023 16:42:12 +0100
Newsgroups comp.databases.mysql
Organization A noiseless patient Spider
Message-ID <[email protected]>
Hi guys,

I need to write in bash a script which do these things:

1) Login to MariaDB;
2) Truncate a table to make it empty;
3) Import data from a file to this table.

I found this guide 
https://notearena.com/lesson/how-to-access-databasemysql-mariadb-in-linux-shell-scripting/ 
and I'd like to know if it's the right way! :)

Now I do everything manually...

Regards.
^Bart