wp_ahm_download_stats
表格已經存在了2.ENGINE=MyISAM DEFAULT CHARSET=latin1;
你的問題不是在這裡,所以簡單描述就可以
前面代表要使用哪種引擎:
MySQL有CSV、Innodb...每個都有各自的獨特處理的功能
後面代表使用哪種字符集
就像windows簡體、繁體語言包差別
建議使用utf-8
要怎麼改utf8
舉例:
CREATE TABLE Table0 (`name` varchar(32), `age` int, `city` varchar(6))
DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci
ok 我刪除了 舊的資料表
現在出現
Stopped at the line 345.
At this place the current query includes more than 300 dump lines. That can happen if your dump file was created by some tool which doesn't place a semicolon followed by a linebreak at the end of each query, or if your dump contains extended inserts or very long procedure definitions. Please read the BigDump usage notes for more infos. Ask for our support services in order to handle dump files containing extended inserts.
找到bigdump.php
檔案
用文本編輯器把define ('MAX_QUERY_LINES',300);
中300的數字改大
方法來源:
mysqldump - MySQL Import Database Error because of Extended Inserts - Stack Overflow
所以原本是
DEFAULT CHARSET=latin1
改成
DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
也可以嗎? 不用=?
可以
舉例:
CREATE TABLE test (
id INT DEFAULT NULL
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE TABLE test2 (
id INT DEFAULT NULL
) DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_unicode_ci;
其他補充可以看S.O這篇
What is the best collation to use for MySQL with PHP? - Stack Overflow