Running Multiple Copies of MariaDB

You are viewing an old version of this article. View the current version here.

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:

# TCP port to use to connect to mysqld server
# Socket to use to connect to mysqld server
# TCP port to make available for clients
#  Socket to make available for clients
# Where MariaDB should store all its 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:

mysqld --print-defaults

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:

mysqld --defaults-file=~/.my.cnf


Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.