mysql service在啟動的時候都會顯示
Timeout error occurred trying to start MySQL Daemon.
底下是/var/log/mysqld.log
040508 01:48:04 mysqld ended
040508 01:48:07 mysqld started
Cannot initialize InnoDB as 'innodb_data_file_path' is not set.
If you do not want to use transactional InnoDB tables, add a line
skip-innodb
to the [mysqld] section of init parameters in your my.cnf
or my.ini. If you want to use InnoDB tables, add to the [mysqld]
section, for example,
innodb_data_file_path = ibdata1:10M:autoextend
But to get good performance you should adjust for your hardware
the InnoDB startup options listed in section 2 at
http://www.innodb.com/ibman.html
/usr/libexec/mysqld: ready for connections
mysql 支援幾種資料表格式 myisam,innodb..等
而你的組態檔中innodb的部分設定有誤,於是mysql告訴你起始錯誤
解決方法如下
修改 /etc/rc.d/init.d/mysqld
if [ $ret -eq 0 ]; then
for x in 1 2 3 4 5 6 7 8 9 10; do
if [ -n "`/usr/bin/mysqladmin ping 2> /dev/null`" ]; then
break;
else
sleep 1;
fi
done
if !([ -n "`/usr/bin/mysqladmin ping 2> /dev/null`" ]); then
echo "Timeout error occurred trying to start MySQL Daemon."
action $"Starting $prog: " /bin/false
else
action $"Starting $prog: " /bin/true
fi
else
action $"Starting $prog: " /bin/false
fi
將以上兩個 ping 的後面各加上 -u
if [ $ret -eq 0 ]; then
for x in 1 2 3 4 5 6 7 8 9 10; do
if [ -n "`/usr/bin/mysqladmin ping -u 2> /dev/null`" ]; then
break;
else
sleep 1;
fi
done
if !([ -n "`/usr/bin/mysqladmin ping -u 2> /dev/null`" ]); then
echo "Timeout error occurred trying to start MySQL Daemon."
action $"Starting $prog: " /bin/false
else
action $"Starting $prog: " /bin/true
fi
else
action $"Starting $prog: " /bin/false
fi
這樣就可以了.
|
|