2017-05-27 38 views
-2

我有一個很大的腳本,我試圖執行。它位於在這裏:​​https://github.com/diamondo25/mcdb-files/blob/master/mcdb-4.3-global-83/mcdb-4.3-global-83.sql.gz我找不到這個SQL腳本有什麼問題

不過,我receviing以下錯誤:enter image description here

我真的什麼都試過,但失敗了。我知道這是一個大腳本,但不幸的是我沒有其他地方比StackOverflow尋求幫助。順便說一句,我正在使用MariaDB和MySQL查詢瀏覽器來執行它。

這裏的第28行前查詢:

/*Data for the table `block_chat_reason_data` */ 

insert into `block_chat_reason_data`(`id`,`reason`,`message`) values (1,'Foul Language','Foul language/Harrassment'),(2,'Advertising','Advertising websites'),(3,'Hack','Fake GM'),(4,'Account Trading','Trading or selling account'),(5,'Trading','Do not report fame scams and trade scams. '),(6,'Penalty Alert','The reporter\'s conversation is also subject to penalties.'); 

/*Table structure for table `block_reason_data` */ 

DROP TABLE IF EXISTS `block_reason_data`; 

CREATE TABLE `block_reason_data` (
    `id` int(11) NOT NULL, 
    `block_type` varchar(15) NOT NULL DEFAULT '', 
    `message` varchar(120) NOT NULL DEFAULT '', 
    PRIMARY KEY (`id`) 
); 
+2

更新你的問題,並添加請使用sql命令的文本,並在代碼中加上命令 – scaisEdge

+0

您希望我們調試超過2000行的腳本嗎? – Mihai

+0

@Mhaihai不,錯誤指出了問題所在的位置 - 但我無法弄清楚它有什麼問題。 –

回答

-1

你是不是逃避逗號,儘量

insert into `block_chat_reason_data`(`id`,`reason`,`message`) values (1,'Foul Language','Foul language/Harrassment'),(2,'Advertising','Advertising websites'),(3,'Hack','Fake GM'),(4,'Account Trading','Trading or selling account'),(5,'Trading','Do not report fame scams and trade scams. '),(6,'Penalty Alert','The reporter\''s conversation is also subject to penalties.'); 
+0

三個答案和三個反對票? –

-1

最後一個逗號是上線的問題5.

因此,使用這樣的:

CREATE TABLE `block_reason_data`(
    `id` int(11) NOT NULL, 
    `block_type` varchar(15) NOT NULL DEFAULT '', 
    `message` varchar(120) NOT NULL DEFAULT '' 
    PRIMARY KEY (`id`) 
); 
+0

你幾乎可以肯定需要'DEFAULT'''和'PRIMARY KEY(id)'之間的逗號。 –