Subversion Repositories ALCASAR

Rev

Rev 221 | Rev 228 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 221 Rev 227
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
2
#  $Id: alcasar.sh 221 2010-08-31 06:55:40Z franck $ 
2
#  $Id: alcasar.sh 227 2010-09-02 20:51:15Z franck $ 
3
 
3
 
4
# alcasar.sh
4
# alcasar.sh
5
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
5
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
6
# This script is distributed under the Gnu General Public License (GPL)
6
# This script is distributed under the Gnu General Public License (GPL)
7
 
7
 
Line 627... Line 627...
627
##########################################################################################
627
##########################################################################################
628
init_db ()
628
init_db ()
629
{
629
{
630
	mkdir -p /var/lib/mysql/.tmp
630
	mkdir -p /var/lib/mysql/.tmp
631
	chown mysql:mysql /var/lib/mysql/.tmp
631
	chown mysql:mysql /var/lib/mysql/.tmp
632
	[ -e /etc/my.cnf.rpmnew ] && cp /etc/my.cnf.rpmnew /etc/my.cnf		# prend en compte les migrations de MySQL
632
	[ -e /etc/my.cnf.rpmnew ] && mv /etc/my.cnf.rpmnew /etc/my.cnf		# prend en compte les migrations de MySQL
633
	[ -e /etc/my.cnf.default ] || cp /etc/my.cnf /etc/my.cnf.default
633
	[ -e /etc/my.cnf.default ] || cp /etc/my.cnf /etc/my.cnf.default
634
	$SED "s?^#bind-address.*?bind-address=127.0.0.1?g" /etc/my.cnf
634
	$SED "s?^#bind-address.*?bind-address=127.0.0.1?g" /etc/my.cnf
635
	/etc/init.d/mysqld start
635
	/etc/init.d/mysqld start
636
	sleep 4
636
	sleep 4
637
	mysqladmin -u root password $mysqlpwd
637
	mysqladmin -u root password $mysqlpwd