Running Multiple Copies of MariaDB
The main problem in having many MariaDB instances running on the same computer is that you will get conflicts between port and sockets.
The solution for this, when you want to have your own installation of MariaDB, is to add something like this in your /.my.cnf file:
[client] # TCP port to use to connect to mysqld server port=3306 # Socket to use to connect to mysqld server socket=/tmp/mysql.sock [mariadb] # TCP port to make available for clients port=3306 # Socket to make available for clients socket=/tmp/mysql.sock # Where MariaDB should store all its data data=/usr/local/mysql/data
The above are the default values. Change them to some unique values for your installation.
The above should be enough to get
mysqld to start and for clients like
mysql to connect to it. Documentation for other options can be found here.
To check what values
mysqld is using, you can do:
To list the default values, check the end of:
mysqld --help --verbose
If your problem is that
mysqld reads options from system my.cnf files (like /etc/my.cnf) you can force it to only read one specific configuration file: