測試的OS:Linux,Windows
先於您的電腦(簡稱本機)Windows建立如同您在Linux Server的WAMP環境.
由於網路管理者將MySQL3升級至MySQL5,並未處理phpBB3使用的資料表, 底下說明.
先參考 http://www.phpbb.com/kb/article/doesnt- ... ue-errors/
phpBB3的處理(有得改!), phpBB2的處理請看下文.
以網路phpMyAdmin備份phpBB3使用的資料表,再以本機phpMyAdmin還原.
執行DOS命令,進入 MySQL\bin 資料夾.
代碼: 選擇全部
mysqldump -uroot -p --add-drop-table --default-character-set=latin1 --skip-set-charset db_name > db_name.sql代碼: 選擇全部
ENGINE=MyISAM代碼: 選擇全部
ENGINE=InnoDB代碼: 選擇全部
DEFAULT CHARSET=latin1代碼: 選擇全部
DEFAULT CHARSET=utf8 COLLATE=utf8_bin代碼: 選擇全部
CREATE TABLE `phpbb_bbcodes` (
`bbcode_id` tinyint(3) NOT NULL default '0',
`bbcode_tag` varchar(16) character set latin1 collate latin1_bin NOT NULL default '',
`bbcode_helpline` blob NOT NULL,
`display_on_posting` tinyint(1) unsigned NOT NULL default '0',
`bbcode_match` blob NOT NULL,
`bbcode_tpl` mediumblob NOT NULL,
`first_pass_match` mediumblob NOT NULL,
`first_pass_replace` mediumblob NOT NULL,
`second_pass_match` mediumblob NOT NULL,
`second_pass_replace` mediumblob NOT NULL,
PRIMARY KEY (`bbcode_id`),
KEY `display_on_post` (`display_on_posting`)代碼: 選擇全部
CREATE TABLE `phpbb_bbcodes` (
`bbcode_id` tinyint(3) NOT NULL default '0',
`bbcode_tag` varchar(16) collate utf8_bin NOT NULL default '',
`bbcode_helpline` varchar(255) collate utf8_bin NOT NULL default '',
`display_on_posting` tinyint(1) unsigned NOT NULL default '0',
`bbcode_match` text collate utf8_bin NOT NULL,
`bbcode_tpl` mediumtext collate utf8_bin NOT NULL,
`first_pass_match` mediumtext collate utf8_bin NOT NULL,
`first_pass_replace` mediumtext collate utf8_bin NOT NULL,
`second_pass_match` mediumtext collate utf8_bin NOT NULL,
`second_pass_replace` mediumtext collate utf8_bin NOT NULL,最開始的地方加上這行:
代碼: 選擇全部
set names utf8;代碼: 選擇全部
mysql --user=root --password=password --default-character-set=utf8 db_name < db_name.sql===================================
phpBB2的處理:
以網路phpMyAdmin備份phpBB2使用的資料表,再以本機phpMyAdmin還原.
執行DOS命令,進入 MySQL\bin 資料夾.
代碼: 選擇全部
mysqldump -uroot -p --add-drop-table --default-character-set=latin1 --skip-set-charset db_name > db_name.sql代碼: 選擇全部
ENGINE=MyISAM代碼: 選擇全部
ENGINE=InnoDB代碼: 選擇全部
DEFAULT CHARSET=latin1代碼: 選擇全部
DEFAULT CHARSET=utf8 COLLATE=utf8_bin代碼: 選擇全部
set names utf8;代碼: 選擇全部
mysql --user=root --password=password --default-character-set=utf8 db_name < db_name.sql代碼: 選擇全部
mysql_query("set names 'utf8'");以本機phpMyAdmin備份phpBB3使用的資料表,再以網路phpMyAdmin還原.
參考資料:
http://twpug.net/modules/newbb/viewtopi ... 8&forum=33
http://www.jaceju.net/blog/?p=116#more-116
http://www.dchome.net/xspace/html/3/3-116.html
