Modification: rule_mysql_configure
authorLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Tue, 19 Mar 2013 14:02:57 +0000 (15:02 +0100)
committerLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Tue, 19 Mar 2013 14:03:06 +0000 (15:03 +0100)
etc/mysql/my.cnf [new file with mode: 0644]
vm_hosted

diff --git a/etc/mysql/my.cnf b/etc/mysql/my.cnf
new file mode 100644 (file)
index 0000000..60dd256
--- /dev/null
@@ -0,0 +1,51 @@
+[client]
+port           = 3306
+socket         = /var/run/mysqld/mysqld.sock
+[mysqld_safe]
+nice           = 0
+socket         = /var/run/mysqld/mysqld.sock
+[mysqld]
+# chroot = /var/lib/mysql/
+# ssl-ca=/etc/mysql/cacert.pem
+# ssl-cert=/etc/mysql/server-cert.pem
+# ssl-key=/etc/mysql/server-key.pem
+basedir                = /usr
+bind-address           = 127.0.0.1
+#binlog_do_db          = include_database_name
+#binlog_ignore_db      = include_database_name
+datadir                = /home/mysql
+expire_logs_days       = 10
+#general_log             = 1
+#general_log_file        = /var/log/mysql/mysql.log
+key_buffer             = 16M
+lc-messages-dir        = /usr/share/mysql
+#log-queries-not-using-indexes
+#log_bin                       = /var/log/mysql/mysql-bin.log
+#log_slow_queries      = /var/log/mysql/mysql-slow.log
+#long_query_time = 2
+max_allowed_packet     = 16M
+max_binlog_size         = 100M
+#max_connections        = 100
+myisam-recover         = BACKUP
+pid-file       = /var/run/mysqld/mysqld.pid
+port           = 3306
+query_cache_limit      = 1M
+query_cache_size        = 16M
+#server-id             = 1
+skip-external-locking
+socket         = /var/run/mysqld/mysqld.sock
+#table_cache            = 64
+thread_cache_size       = 8
+#thread_concurrency     = 10
+thread_stack           = 192K
+tmpdir         = /tmp
+user           = mysql
+[mysqldump]
+max_allowed_packet     = 16M
+quick
+quote-names
+[mysql]
+#no-auto-rehash        # faster start of mysql but no tab completition
+[isamchk]
+key_buffer             = 16M
+!includedir /etc/mysql/conf.d/
index 8fc2641..46aa6af 100755 (executable)
--- a/vm_hosted
+++ b/vm_hosted
@@ -708,6 +708,11 @@ rule_mail_configure () {
  }
 rule_mysql_configure () {
        rule apt_get_install mysql-server-5.5
+       sudo install -m 644 -o root -g root \
+           "$tool"/etc/mysql/my.cnf \
+           /etc/mysql/my.cnf
+       sudo install -d -m 750 -o mysql -g mysql \
+        /home/mysql
        sudo service mysql restart
  }
 rule_network_configure () {