From 6c57945b291bcd0b0056c8dd92733ba8bac88c7f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com>
Date: Mon, 25 Jan 2010 15:15:46 +0000
Subject: [PATCH]  - mycnf is not needed to be run, this is configuration
 section only  - group client and server options and reuse it in script
 generation

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31936 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 buildout/mysql-instance/buildout.cfg            | 4 ++--
 buildout/mysql-instance/templates/mysql.in      | 2 +-
 buildout/mysql-instance/templates/mysqladmin.in | 2 +-
 buildout/mysql-instance/templates/mysqld.in     | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/buildout/mysql-instance/buildout.cfg b/buildout/mysql-instance/buildout.cfg
index 42116f629c..7d177aba32 100644
--- a/buildout/mysql-instance/buildout.cfg
+++ b/buildout/mysql-instance/buildout.cfg
@@ -9,7 +9,6 @@ parts =
     mysql-bin
     mysql-admin
     mysql_install_db
-    mycnf
     mysqld-bin
 
 [ports]
@@ -52,4 +51,5 @@ datadir=${buildout:mysql_datadir}
 pid=${:datadir}/mysql.pid
 err = ${buildout:directory}/var/mysql.err.log
 sock = ${:datadir}/mysql.sock
-opt = --port=${ports:mysql} --pid-file=${:pid} --log-error=${:err} --basedir=${:basedir} --datadir=${:datadir} --socket=${:sock} --no-defaults
+mysql_opt = --no-defaults -P ${ports:mysql} -S ${mycnf:sock}
+mysqld_opt = --no-defaults --port=${ports:mysql} --pid-file=${:pid} --log-error=${:err} --basedir=${:basedir} --datadir=${:datadir} --socket=${:sock}
diff --git a/buildout/mysql-instance/templates/mysql.in b/buildout/mysql-instance/templates/mysql.in
index 70cc30df6d..68241e23d1 100755
--- a/buildout/mysql-instance/templates/mysql.in
+++ b/buildout/mysql-instance/templates/mysql.in
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-${software_definition:mysql_software}/bin/mysql -P ${ports:mysql} -S ${mycnf:sock} -u root -p $*
+${software_definition:mysql_software}/bin/mysql ${mycnf:mysql_opt} $@
diff --git a/buildout/mysql-instance/templates/mysqladmin.in b/buildout/mysql-instance/templates/mysqladmin.in
index 1fbc9bae9d..3dfa8a84cf 100755
--- a/buildout/mysql-instance/templates/mysqladmin.in
+++ b/buildout/mysql-instance/templates/mysqladmin.in
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-${software_definition:mysql_software}/bin/mysqladmin -P ${ports:mysql} -S ${mycnf:sock} -u root -p $*
+${software_definition:mysql_software}/bin/mysqladmin ${mycnf:mysql_opt} $@
diff --git a/buildout/mysql-instance/templates/mysqld.in b/buildout/mysql-instance/templates/mysqld.in
index 2ff13369fe..1c2e0e0044 100755
--- a/buildout/mysql-instance/templates/mysqld.in
+++ b/buildout/mysql-instance/templates/mysqld.in
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-${software_definition:mysql_software}/bin/mysqld_safe ${mycnf:opt}
+${software_definition:mysql_software}/bin/mysqld_safe ${mycnf:mysqld_opt}
-- 
2.30.9