summaryrefslogtreecommitdiff
path: root/dev-db/mysql-proxy/files
diff options
context:
space:
mode:
Diffstat (limited to 'dev-db/mysql-proxy/files')
-rw-r--r--dev-db/mysql-proxy/files/mysql-proxy.cnf47
-rw-r--r--dev-db/mysql-proxy/files/mysql-proxy.confd12
-rw-r--r--dev-db/mysql-proxy/files/mysql-proxy.confd-0.8.0-r112
-rw-r--r--dev-db/mysql-proxy/files/mysql-proxy.initd22
4 files changed, 93 insertions, 0 deletions
diff --git a/dev-db/mysql-proxy/files/mysql-proxy.cnf b/dev-db/mysql-proxy/files/mysql-proxy.cnf
new file mode 100644
index 000000000000..7d15674f6b9d
--- /dev/null
+++ b/dev-db/mysql-proxy/files/mysql-proxy.cnf
@@ -0,0 +1,47 @@
+# MySQL Proxy's configuration file (mysql-proxy.cnf)
+# This file must be 0660 or more restrictive
+# otherwise mysql-proxy will refuse to load
+[mysql-proxy]
+#basedir = ...
+#daemon = true
+#defaults-file = ...
+#event-threads = ...
+keepalive = true
+log-backtrace-on-crash = true
+log-file = /var/log/mysql/mysql-proxy.log
+log-level = warning
+#log-use-syslog = true
+#lua-cpath = ...
+#lua-path = ...
+#max-open-files = ...
+pid-file = /var/run/mysql-proxy.pid
+#plugin-dir = ...
+#plugins = admin,proxy,debug,replicant
+#plugins = admin,proxy
+plugins = proxy
+#user = ...
+
+# module: admin
+admin-address = 127.0.0.1:4041
+#admin-lua-script = ...
+#admin-password = ...
+#admin-username = ...
+
+# module: proxy
+#no-proxy = false
+proxy-address = 127.0.0.1:4040
+proxy-backend-addresses = 127.0.0.1:3306
+proxy-fix-bug-25371 = false
+#proxy-lua-script = ...
+#proxy-pool-no-change-user = ...
+#proxy-read-only-backend-addresses = ...
+proxy-skip-profiling = false
+
+# module: replicant
+#replicant-master-address = ...
+#replicant-username = ...
+#replicant-password = ...
+#replicant-read-binlogs = ...
+
+# module: debug
+debug-address = 127.0.0.1:4043
diff --git a/dev-db/mysql-proxy/files/mysql-proxy.confd b/dev-db/mysql-proxy/files/mysql-proxy.confd
new file mode 100644
index 000000000000..079530159f82
--- /dev/null
+++ b/dev-db/mysql-proxy/files/mysql-proxy.confd
@@ -0,0 +1,12 @@
+# /etc/conf.d/mysql-proxy: config file for /etc/init.d/mysql-proxy
+
+# location of pidfile
+PIDFILE="/var/run/mysql-proxy.pid"
+
+# general options for mysql-proxy
+# do NOT specify --daemon or --pid-file=... here!
+OPTS="--log-use-syslog"
+
+# if you want mysql-proxy to depend on mysql, enable this:
+#RC_NEED="mysql" # baselayout-1
+#rc_need="mysql" # baselayout-2/OpenRC
diff --git a/dev-db/mysql-proxy/files/mysql-proxy.confd-0.8.0-r1 b/dev-db/mysql-proxy/files/mysql-proxy.confd-0.8.0-r1
new file mode 100644
index 000000000000..8b86431a3d8f
--- /dev/null
+++ b/dev-db/mysql-proxy/files/mysql-proxy.confd-0.8.0-r1
@@ -0,0 +1,12 @@
+# /etc/conf.d/mysql-proxy: config file for /etc/init.d/mysql-proxy
+
+# location of pidfile
+PIDFILE="/var/run/mysql-proxy.pid"
+
+# general options for mysql-proxy
+# do NOT specify --daemon or --pid-file=... here!
+OPTS="--defaults-file=/etc/mysql/mysql-proxy.cnf"
+
+# if you want mysql-proxy to depend on mysql, enable this:
+#RC_NEED="mysql" # baselayout-1
+#rc_need="mysql" # baselayout-2/OpenRC
diff --git a/dev-db/mysql-proxy/files/mysql-proxy.initd b/dev-db/mysql-proxy/files/mysql-proxy.initd
new file mode 100644
index 000000000000..7107facfd6f8
--- /dev/null
+++ b/dev-db/mysql-proxy/files/mysql-proxy.initd
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting MySQL Proxy"
+ start-stop-daemon --start --quiet \
+ --exec /usr/bin/mysql-proxy \
+ -- --daemon --pid-file="${PIDFILE}" ${OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping MySQL Proxy"
+ start-stop-daemon --stop --quiet \
+ --pidfile "${PIDFILE}"
+ eend $?
+}