summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2008-07-11 14:13:03 +0000
committermh <mh@immerda.ch>2008-07-11 14:13:03 +0000
commit3a8613ab9d7235109eda1a3d41e249fd2159a29a (patch)
treed32accbd3a5934ce8d58b2d0d6e2e1d1af12f5af
parent8e71241b85ed1e8185a67570087a7da0ba4fb93b (diff)
merged with puzzle
-rw-r--r--files/backup/mysql_backup.cron2
-rw-r--r--files/config/CentOS/setmysqlpass.sh2
-rw-r--r--files/config/my.cnf3
-rw-r--r--files/config/my.cnf.Gentoo3
-rw-r--r--manifests/init.pp19
5 files changed, 13 insertions, 16 deletions
diff --git a/files/backup/mysql_backup.cron b/files/backup/mysql_backup.cron
index fed14fb..375d910 100644
--- a/files/backup/mysql_backup.cron
+++ b/files/backup/mysql_backup.cron
@@ -1 +1 @@
-00 01 * * * root /usr/bin/mysqldump --all-databases --all | gzip > /var/lib/mysql/mysqldump.sql.gz && chmod 600 /var/lib/mysql/mysqldump.sql.gz
+00 01 * * * root /usr/bin/mysqldump --all-databases --all | gzip > /var/lib/mysql/mysqldump.sql.gz && chmod 600 /var/lib/mysql/data/mysqldump.sql.gz
diff --git a/files/config/CentOS/setmysqlpass.sh b/files/config/CentOS/setmysqlpass.sh
index f4fbe12..6d17fd9 100644
--- a/files/config/CentOS/setmysqlpass.sh
+++ b/files/config/CentOS/setmysqlpass.sh
@@ -4,7 +4,7 @@ test $# -gt 0 || exit 1
/sbin/service mysqld stop
-/usr/libexec/mysqld --skip-grant-tables --user=root &
+/usr/libexec/mysqld --skip-grant-tables --user=root --datadir=/var/lib/mysql --log-bin=/var/lib/ &
sleep 5
echo "USE mysql; UPDATE user SET Password=PASSWORD('$1') WHERE User='root' AND Host='localhost';" | mysql -u root
killall mysqld
diff --git a/files/config/my.cnf b/files/config/my.cnf
index 6d3efc6..b3c1f0b 100644
--- a/files/config/my.cnf
+++ b/files/config/my.cnf
@@ -1,5 +1,6 @@
[mysqld]
-datadir=/var/lib/mysql
+datadir=/var/lib/mysql/data
+log-bin=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
diff --git a/files/config/my.cnf.Gentoo b/files/config/my.cnf.Gentoo
index b51ec21..de2e2b7 100644
--- a/files/config/my.cnf.Gentoo
+++ b/files/config/my.cnf.Gentoo
@@ -51,7 +51,8 @@ socket = /var/run/mysqld/mysqld.sock
pid-file = /var/run/mysqld/mysqld.pid
log-error = /var/log/mysql/mysqld.err
basedir = /usr
-datadir = /var/lib/mysql
+datadir = /var/lib/mysql/data
+log-bin = /var/lib/mysql
skip-locking
key_buffer = 16M
max_allowed_packet = 1M
diff --git a/manifests/init.pp b/manifests/init.pp
index a3d8cbb..7c6ca71 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -22,18 +22,13 @@ class mysql::server {
default: { include mysql::server::base }
}
- # avoid problem with bootstrapping
- #case $mysql_exists {
- # 'true': {
- if $selinux {
- include mysql::selinux
- }
-
- if $use_munin {
- include mysql::munin
- }
- # }
- #}
+ if $selinux {
+ include mysql::selinux
+ }
+
+ if $use_munin {
+ include mysql::munin
+ }
}
class mysql::server::base {