お世話になります。横山です。
自分でネット検索続けていたら
/etc/my.cnfは必要なら作成するという
内容が書かれていたサイトをみつけることが
できました。
FAQな内容ですみませんでした。
シェルスクリプトをあまり理解してない
ので誠に申し訳ないんですが、
/etc/init.d/mysqlのスクリプトは
変更しなくてもよいのでしょうか?
/etc/init.d/mysqlに
下記のような記述があったのですが、
これは/etc/my.cnfファイルを読むように
なっているのかなってないのかという
判断ができません。
かさねがさね申し訳ありませんが、
/etc/my.cnfは読み込んでくれるのかどうか
お教え願えないでしょうか?
# Get arguments from the my.cnf file, groups [mysqld] and
[mysql_server]
if test -x ./bin/my_print_defaults
then
print_defaults="./bin/my_print_defaults"
elif test -x $bindir/my_print_defaults
then
print_defaults="$bindir/my_print_defaults"
elif test -x $bindir/mysql_print_defaults
then
print_defaults="$bindir/mysql_print_defaults"
else
# Try to find basedir in /etc/my.cnf
conf=/etc/my.cnf
print_defaults=
if test -r $conf
then
subpat='^[^=]*basedir[^=]*=\(.*\)$'
dirs=`sed -e "/$subpat/!d" -e 's//\1/' $conf`
for d in $dirs
do
d=`echo $d | sed -e 's/[ ]//g'`
if test -x "$d/bin/my_print_defaults"
then
print_defaults="$d/bin/my_print_defaults"
break
fi
if test -x "$d/bin/mysql_print_defaults"
then
print_defaults="$d/bin/mysql_print_defaults"
break
fi
done
fi
# Hope it's in the PATH ... but I doubt it
test -z "$print_defaults" && print_defaults="my_print_de
faults"
fi