MySQL 数据库导入错误

标签 mysql sql phpmyadmin

通过 php myadmin 将数据库从旧主机导入到新主机时,出现错误 1064。

你能帮我解决这个问题吗?

SQL query:

 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 said:

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 

Full Query

--
-- 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`

最佳答案

让大家知道,问题出在 phpmyadmin 中。

数据库太大,我成功地通过 ssh 导入它,没有出现问题。

关于MySQL 数据库导入错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17446423/

相关文章:

mysql - 无法在 Excel for Mac 2016 中加载 macOS Connector/MySQL ODBC 驱动程序

mysql - 计算一段时间内的记录

MySQL噩梦

Mysql数据库重复条目

mysql - 需要帮助在sql中按时搜索

mysql - 使用 Rails 查询返回单个字段

mysql - 如何从两个不相关的表中进行选择

sql - varchar 的最大长度是多少(doctrine :string) in Doctrine 2 or SQL?

c# - 使用 ado.net 和 c# 连接 .csv 文件

java - getConnection() 中抛出空指针异常