文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>Fedora Core 1 的 MySQL起动问题

Fedora Core 1 的 MySQL起动问题

时间:2008-04-19  来源:sdccf

作者:lg    来自:www.china-lg.com

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

這樣就可以了.
相关阅读 更多 +
排行榜 更多 +
找茬脑洞的世界安卓版

找茬脑洞的世界安卓版

休闲益智 下载
滑板英雄跑酷2手游

滑板英雄跑酷2手游

休闲益智 下载
披萨对对看下载

披萨对对看下载

休闲益智 下载