Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 “No such file or directory”) when configuring cluster
Check your config files /etc/my.cnf and /etc/my.cnf.d/server.cnf and look for the socket parameter. Make sure it's the same for client and server. A good place for the socket parameter is in the [client-server] section in /etc/my.cnf. The socket file is created by the MariaDB server when it starts up. 

Note that there are other places where MariaDB config files could reside, and these could potentially override your settings in the two files mentioned above. For more details, see this page in the MariaDB KB. 

Also note that you may be able to connect to MariaDB through TCP rather than through the socket. You can specify that you want to use TCP rather than the socket with mysql ... --protocol=TCP. If this is successful, you can then do SHOW VARIABLES LIKE 'socket'; to find out where the socket file really is (or should be). You can then connect with mysql ... --socket=/path/to/file.sock or edit the config files so that the client reads it correctly from there.

In some cases you may also be able to figure out what socket file location is used by listing the processes: ps -ef | grep mysql which could output something like

root     23900     1  0 13:27 ?        00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/vserv-03.pid
mysql    24402 23900  0 13:27 ?        00:00:50 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --wsrep_on=ON --wsrep_provider=/usr/lib64/galera/libgalera_smm.so --log-error=/var/lib/mysql/vserv-03.err --open-files-limit=65535 --pid-file=/var/lib/mysql/vserv-03.pid --socket=/var/lib/mysql/mysql.sock --wsrep_start_position=98b22222-aa16-1114-ba1a-886633c6b8eb:55133333


As you can see here (scroll right), it's using a socket at /var/lib/mysql/mysql.sock. 

EDIT: 
A really good way of finding the location of the socket file is:

netstat -ln | grep mysql
unix  2      [ ACC ]     STREAM     LISTENING     22418    /var/lib/mysql/mysql.sock