cacti設定中、sqlをDBに流し込む時に出たエラー

--------------------------------------------------------------
# /usr/local/mysql5/bin/mysql -u root cacti < cacti.sql

ERROR 1064 (42000) at line 5: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 6
--------------------------------------------------------------

おぉう(゚д゚)


参考にしたサイトさま にて下記を発見しました。

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

"TYPE=" has been deprecated since MySQL 4.1 and has been replaced with "ENGINE=". Further, support for "TYPE=" has been completely removed since MySQL 5.4.4, which makes the default Cacti package incompatible without editing cacti.sql and replacing "TYPE=" with "ENGINE="

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


つまりつまり、MySQL4.1から「ENGINE=」を使っていて

「TYPE=」もまあ使用できてましたが

MySQL5.4以降からは完全に「TYPE=」は使えないってことですね?(・∀・)


じゃあ直さないといけないので

-----------------------------------------------------
# vi cacti.sql

:%s/TYPE/ENGINE/gc ←これで全部置換

--------------------------------------------------------------


48箇所全部置換して、そのあとエラーも出ずちゃんと実行できました(´3`)


にほんブログ村 IT技術ブログ 女性プログラマー・女性SEへ にほんブログ村 OL日記ブログ 20代OLへ