No.
OCS is designed for access MySQL/MariaDB using network and usually 'localhost'=127.0.0.1. Good chance for change it (OCS) for using socket ! Ask directly creator ...
When you install MySQL/MariaDB, by default, it's bind to 127.0.0.1 and without socket. So security are TOTALLY the same : it's not possible to reach the MySQL server from another computer thru network !
The difference is when you bind MySQL/MariaDB with an real internal ip (192.168.x.x) ...
(I create only dedicated server for OCS ... When you have questions, if you don't give enough informations, why you think readers can understand your requirements ?)