CREATE TRIGGER safety_drop
ON DATABASE
FOR DROP_TABLE
AS
BEGIN
SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'DELETING NOT ALLOWED';
ROLLBACK;
END
ERROR
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ON DATABASE FOR DROP_TABLE AS BEGIN SIGNAL SQLSTATE '45000' SET MESSAGE_TEX' at line 2
MariaDB just does not support "database-level" triggers. Quoting the documentation (emphasis added):
So basically this works on DML operations (statements that change the data), not on DDL (operations that change the structure).
As for what you ask for, using permissions and roles to prevent users from dropping any table in the database seems like a more relevant approach.