Multiple MySQL Instances

Table of Contents

Linux#

Create a duplicate of /etc/my.cnf as /etc/my2.cnf with different values for port, pid, datadir, sock, etc.. and start mysql as

$ mysqld_safe --defaults-file=/etc/my2.cnf

You can connect on localhost with --host=127.0.0.1 --port=xxxx

You can connect from remote host with --host=x.x.x.x --port=xxxx


MySQL - Linux