You are concerned that your application is somehow a derivative work of MariaDB and therefore subject to the GPL. It's not totally clear to me whether that is the case or not.
But it doesn't matter, because you are not distributing MariaDB itself (or any other part of your application). You're running it on a server which users are connecting to remotely. From MariaDB's licensing FAQ:
Internal usage is free
The GPL license only affects code that you distribute to other parties.
Internal usage within an organization is totally free and not subject to any conditions. There is no such thing as 'internal distribution' that would restrict the usage of your code by requiring it to be GPLed.
Connecting to a remote service that runs MariaDB (or any other GPL software) in the background is also free.
For internal programs for which you own all the copyright(s), there is essentially no risk in using GPL software. The argument you can use in your defense is that if the software became GPL as part of the distribution, you as the copyright holder could immediately revert your part back to its original copyright. No one has the right to require you to reveal or redistribute your code to the outside of your organization even if you would have distributed it internally linked with GPL software!
If your lawyers are concerned about distributions of software linked with GPL libraries between different legal entities within your organization, you can solve this by distributing your components and the GPL software separately, and have your other entity combining them. You can also switch to use the new LGPL client libraries.
The use you have described in your question clearly falls into this case, and the presence of this FAQ item clearly demonstrates that the MariaDB developers intended to allow you to do this. The Free Software Foundation (the people who wrote the GPL) agree with this position for both unmodified copies and derivative works.
Technically, you don't need a license to "use" a piece of software at all, assuming you have lawfully obtained it. But you're concerned about the possibility of creating a derivative work, for which a license is required. Fortunately, the GPL doesn't care about derivative works so long as they are not distributed.