commit: ab665d8ffe03a574e3329708293bcda1cf17074c
Author: Brian Evans <grknight <AT> lavabit <DOT> com>
AuthorDate: Wed Mar 12 01:31:27 2014 +0000
Commit: Brian Evans <grknight <AT> lavabit <DOT> com>
CommitDate: Wed Mar 12 01:31:27 2014 +0000
URL:
http://git.overlays.gentoo.org/gitweb/?p=proj/mysql.git;a=commit;h=ab665d8f
[mariadb-galera] Provide a base config and instructions
---
dev-db/mariadb-galera/files/my.cnf-5.5 | 30 ++++++++++++++++++------------
eclass/mysql-v2.eclass | 10 ++++++++++
2 files changed, 28 insertions(+), 12 deletions(-)
diff --git a/dev-db/mariadb-galera/files/my.cnf-5.5
b/dev-db/mariadb-galera/files/my.cnf-5.5
index 195ff90..237c97c 100644
--- a/dev-db/mariadb-galera/files/my.cnf-5.5
+++ b/dev-db/mariadb-galera/files/my.cnf-5.5
@@ -64,11 +64,6 @@ lc_messages_dir =
@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql
#Set this to your desired error message language
lc_messages = en_US
-# security:
-# using "localhost" in connects uses sockets by default
-# skip-networking
-bind-address = 127.0.0.1
-
log-bin
server-id = 1
@@ -86,10 +81,6 @@ tmpdir =
@GENTOO_PORTAGE_EPREFIX@/tmp/
#debug = d:t:i:o,/tmp/mysqld.trace
#one-thread
-# uncomment the following directives if you are using BDB tables
-#bdb_cache_size = 4M
-#bdb_max_lock = 10000
-
# the following is the InnoDB configuration
# if you wish to disable innodb instead
# uncomment just the next line
@@ -128,6 +119,22 @@ innodb_file_per_table
#plugin-load=federated=ha_federated.so
loose-federated
+# These settings are required for Galera clustering
+#mysql settings
+binlog_format=ROW
+default-storage-engine=innodb
+innodb_autoinc_lock_mode=2
+query_cache_size=0
+query_cache_type=0
+bind-address=0.0.0.0
+# Uncomment this section to activate Galera clustering
+#wsrep_provider=@GENTOO_PORTAGE_EPREFIX@/usr/lib/galera/libgalera_smm.so
+# You should change this name to something meaningful
+#wsrep_cluster_name="my_wsrep_cluster"
+# List all nodes of the cluster including this one
+#wsrep_cluster_address="gcomm://172.16.8.5,172.16.8.6,172.16.8.4"
+#wsrep_sst_method=rsync
+
[mysqldump]
quick
max_allowed_packet = 16M
@@ -145,9 +152,8 @@ write_buffer = 2M
[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
-read_buffer = 2M
-write_buffer = 2M
+read_buffer_size = 2M
+write_buffer_size = 2M
[mysqlhotcopy]
interactive-timeout
-
diff --git a/eclass/mysql-v2.eclass b/eclass/mysql-v2.eclass
index 1957ec8..b541347 100644
--- a/eclass/mysql-v2.eclass
+++ b/eclass/mysql-v2.eclass
@@ -600,6 +600,16 @@ mysql-v2_pkg_postinst() {
elog "If you are upgrading major versions, you should run the"
elog "mysql_upgrade tool."
einfo
+
+ if [[ ${PN} == "mariadb-galera" ]] ; then
+ einfo
+ elog "Be sure to edit the my.cnf file to activate your
cluster settings."
+ elog "This should be done after running \"emerge
--config =${CATEGORY}/${PF}\""
+ elog "The first time the cluster is activated, you
should add"
+ elog "--wsrep-new-cluster to the options in
/etc/conf.d/mysql for one node."
+ elog "This option should then be removed for subsequent
starts."
+ einfo
+ fi
fi
if use_if_iuse pbxt ; then