2013-07-03 75 views
0

當我通過php myadmin從舊主機導入到新主機時,我得到了一個錯誤1064。MySQL db導入錯誤

你能幫我解決這個問題嗎?

SQL查詢:

forum_hrhokej1.sql100777 0 0 1635074240 12165000252 10020 0-- -- Database: `bmikic_hrhokej` -- -- -------------------------------------------------------- -- -- Table structure for table `phpbb_acl_groups` -- CREATE TABLE IF NOT EXISTS `phpbb_acl_groups` (`group_id` mediumint(8) unsigned NOT NULL DEFAULT '0', `forum_id` mediumint(8) unsigned NOT NULL DEFAULT '0', `auth_option_id` mediumint(8) unsigned NOT NULL DEFAULT '0', `auth_role_id` mediumint(8) unsigned NOT NULL DEFAULT '0', `auth_setting` tinyint(2) NOT NULL DEFAULT '0',[...] 

MySQL表示:

1064 - 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 'forum_hrhokej1.sql' at line 1 

完整的查詢

-- 
-- Database: `bmikic_hrhokej.sql` 
-- 

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

-- 
-- Table structure for table `phpbb_acl_groups` 
-- 

CREATE TABLE IF NOT EXISTS `phpbb_acl_groups` (
`group_id` mediumint(8) unsigned NOT NULL DEFAULT '0', 
`forum_id` mediumint(8) unsigned NOT NULL DEFAULT '0', 
`auth_option_id` mediumint(8) unsigned NOT NULL DEFAULT '0', 
`auth_role_id` mediumint(8) unsigned NOT NULL DEFAULT '0', 
`auth_setting` tinyint(2) NOT NULL DEFAULT '0', 
    KEY `group_id` (`group_id`), 
KEY `auth_opt_id` (`auth_option_id`), 
KEY `auth_role_id` (`auth_role_id`) 
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; 

-- 
-- Dumping data for table `phpbb_acl_groups` 
+0

顯示您的完整查詢供我們查看和評估。 – Edper

+0

編輯,感謝您的幫助 – WebDeveloper

+0

創建表語句看起來很好,你確定你試圖以正確的方式導入它嗎? –

回答

0

爲了讓大家都知道,問題出在phpmyadmin。

數據庫太大了,我設法通過ssh導入它沒有問題。

+0

您收到關於'forum_hrhokej1.sql'的正常錯誤:'forum_hrhokej1.sql100777 0 0 1635074240 12165000252 10020 0'甚至不像SQL代碼,其他所有內容都用' - '註釋掉。 –

+0

我設法從SSH導入相同的SQL數據庫,顯然phpmyadmin做錯了 – WebDeveloper

+0

可能不是相同的查詢。您已發佈2個查詢。該錯誤屬於第一個,顯然已被破壞。 –