how to install a second server of mariadb I have a server where cpanel is installed (it includes mysql 5, php). What I need is to install a second database server mariadb 10.1.20. I tried through:

yum install MariaDB-10.1.20-centos6-x86_64-common.rpm


But it shows me conflicts like 

Transaction Check Error:
  file /usr/share/mysql/charsets/Index.xml from install of MariaDB-common-10.1.20-1.el6.x86_64 conflicts with file from package MySQL56-server-5.6.38-1.cp1162.x86_64
  file /usr/share/mysql/charsets/README from install of MariaDB-common-10.1.20-1.el6.x86_64 conflicts with file from package MySQL56-server-5.6.38-1.cp1162.x86_64


What can I do for this case?
You will probably run into more conflicts than just what is listed in the question, e.g. TCP port, datadir, /etc/my.cnf, as well as maybe pid and socket. I think these configuration issues can be overcome by using different settings (MariaDB-specific sections in the .cnf files). 

I'm not sure whether installing MariaDB from packages alongside a standard installation of MySQL (from packages) is feasible. rpm has an option --relocate OLDPATH=NEWPATH and --prefix NEWPATH which allows you to set a non-standard install path for rpms marked as relocatable. Not all rpms are reloatable. 

However, see Installing MariaDB alongside MySQL (mariadb.com) which talks about installing the compiled binary distribution of MariaDB 5.5 from source code alongside an existing installation of MySQL. This is also the approach used by tools like dbdeployer.

See also Running Multiple MySQL Instances on One Machine (mysql.com) which talks about installing multiple MySQL instances on the same server. This may or may not be useful.

One relatively low-effort solution could be to install MariaDB in a Docker container. See e.g. MariaDB and Docker use cases, Part 1:


  Docker use case #1: Multi Tenancy
  
  A common use case for MariaDB and Docker is running several instances of MariaDB on the same physical hosts.