From 029df230d6c6d255d8673c715fa2d0294502ea46 Mon Sep 17 00:00:00 2001 From: xq2005 Date: Tue, 19 Mar 2013 07:43:30 +0000 Subject: [PATCH] use mysql db on debian/ubuntu git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15570 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client/bin/mysqlsetup | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/xCAT-client/bin/mysqlsetup b/xCAT-client/bin/mysqlsetup index 3645a8309..188477035 100755 --- a/xCAT-client/bin/mysqlsetup +++ b/xCAT-client/bin/mysqlsetup @@ -807,6 +807,17 @@ sub initmysqldb } } # end AIX only + #on debian/ubuntu should comment the bind-adress line in my.cnf + if ( $::debianflag ){ + $cmd = "sed 's/\\(^\\s*bind.*\\)/#\\1/' /etc/mysql/my.cnf > /tmp/my.cnf; mv -f /tmp/my.cnf /etc/mysql/my.cnf;chmod 644 /etc/mysql/my.cnf"; + xCAT::Utils->runcmd($cmd, 0); + if ($::RUNCMD_RC != 0) + { + xCAT::MsgUtils->message("E", " comment the bind-address line in /etc/mysql/my.cfg failed: $cmd."); + exit(1); + } + } + # Create the MySQL data directory and initialize the grant tables # if not already setup my $cmd2 =