Ulimit is set via the service now.
Create the folder for the service name, in this case MariaDB.service.d
mkdir /etc/systemd/system/mariadb.service.d
Then create limits.conf and set the file limits.
/etc/systemd/system/mariadb.service.d/limits.conf
File Contents:
[Service]
LimitNOFILE=24000