These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for MySQL cluster on the new forum.
This website is deprecated, and remains online only for historic access to old issues and docs for historic versions of Virtualmin. It has been unmaintained for several years, and should not be relied on for up-to-date information. Please visit www.virtualmin.com instead.
Virtualmin has the ability to manage tables and users across multiple databases, for ndb_cluster tables, but it does not address replication at all, currently.
I was aware there was a good, established, standard for replication in MySQL. Is this feature available stock in any MySQL packages in mainstream distributions? If so, we could start work on providing more automation for this capability.
I've found, that MySQL has ability to replicate one by one database in all distributions - I got FreeBSD and several years ago I've configured MySQL master and slave to do this. It is simple - just adding a line into my.cnf config and than run some replication rutine in mysql> shell. I think it is the same on every MySQL installation. So if you can only implement a option to replicate or not (defined in template of virtual server) it will be enough.
It is very simple to setup whole MySQL replication through binary-log file.
on master just setup:
[mysqld]
server-id = 1
log-bin = $your_path_to_log
on slave:
[mysqld]
server-id = 2
master-host = $IP.A.D.D.R
master-user = $user
master-password = $pass
and on master grant acces to . to $user via:
grant all on . to '$user'@'$SLAVE.IP.ADD.R' identified by '$pass'
That is all magic. I've tested it and it works - creating and deleting databases etc.
Keep attention on firewall and bind-address.
Now comes problem with crashes. I must setup my Joomla! installations to look for mysql on DNS record and switch that record to slave when master crashes. And turn slave into master.
Virtualmin has the ability to manage tables and users across multiple databases, for ndb_cluster tables, but it does not address replication at all, currently.
I was aware there was a good, established, standard for replication in MySQL. Is this feature available stock in any MySQL packages in mainstream distributions? If so, we could start work on providing more automation for this capability.
--
Check out the forum guidelines!
I've found, that MySQL has ability to replicate one by one database in all distributions - I got FreeBSD and several years ago I've configured MySQL master and slave to do this. It is simple - just adding a line into my.cnf config and than run some replication rutine in mysql> shell. I think it is the same on every MySQL installation. So if you can only implement a option to replicate or not (defined in template of virtual server) it will be enough.
Sorry if you ment something else.
It was my fault - I am lazy admin ;o)
It is very simple to setup whole MySQL replication through binary-log file.
on master just setup:
[mysqld]
server-id = 1
log-bin = $your_path_to_log
on slave:
[mysqld]
server-id = 2
master-host = $IP.A.D.D.R
master-user = $user
master-password = $pass
and on master grant acces to . to $user via:
grant all on . to '$user'@'$SLAVE.IP.ADD.R' identified by '$pass'
That is all magic. I've tested it and it works - creating and deleting databases etc. Keep attention on firewall and bind-address.
Now comes problem with crashes. I must setup my Joomla! installations to look for mysql on DNS record and switch that record to slave when master crashes. And turn slave into master.