Can';在phpMyAdmin中导入MySQL数据库

Can';在phpMyAdmin中导入MySQL数据库,mysql,sql,phpmyadmin,Mysql,Sql,Phpmyadmin,我正在phpMyAdmin中导入数据库,但有错误。我尝试了太多,但显示了相同的错误,下面是SQL数据库: CREATE TABLE `business` ( `b_id` bigint(20) NOT NULL AUTO_INCREMENT, `b_title` text, `b_lastmodified` datetime DEFAULT NULL, `b_detail` text, `b_banner_image` varchar(250) DEFAULT NULL,

我正在phpMyAdmin中导入数据库,但有错误。我尝试了太多,但显示了相同的错误,下面是SQL数据库:

CREATE TABLE `business` (
  `b_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `b_title` text,
  `b_lastmodified` datetime DEFAULT NULL,
  `b_detail` text,
  `b_banner_image` varchar(250) DEFAULT NULL,
  `b_cat_id` int(10) DEFAULT '100',
  `b_subcat_id` int(10) DEFAULT NULL,
  `b_tags` text,
  `b_user_id` bigint(20) DEFAULT NULL,
  `b_isactive` tinyint(1) DEFAULT '0' COMMENT 'admin will approve it',
  `b_created_on` datetime DEFAULT NULL,
  `b_views` bigint(20) DEFAULT '0' COMMENT 'number of times this is viewed',
  PRIMARY KEY (`b_id`)
) ENGINE=MyISAM AUTO_INCREMENT=764 DEFAULT CHARSET=utf8;

INSERT INTO `business` (`b_id`, `b_title`, `b_lastmodified`, `b_detail`, `b_banner_image`, `b_cat_id`, `b_subcat_id`, `b_tags`, `b_user_id`, `b_isactive`, `b_created_on`, `b_views`) VALUES ('1', 'Couple Names Silver Pendant', '2014-01-15 02:25:02', '', 'itm_couple-names-silver-pendant2013-03-25_22-07-16_1.jpg', '35', '0', 'love pendant,name pictures,silver name pendant,couple name pendant,locket of love,chain of name,fb display photos', '1', '1', '2013-03-25 22:06:53', '7263');
并显示这些错误:

Error
SQL query:

CREATE TABLE  `business` (

 `b_id` BIGINT( 20 ) NOT NULL AUTO_INCREMENT ,
 `b_title` TEXT,
 `b_lastmodified` DATETIME DEFAULT NULL ,
 `b_detail` TEXT,
 `b_banner_image` VARCHAR( 250 ) DEFAULT NULL ,
 `b_cat_id` INT( 10 ) DEFAULT  '100',
 `b_subcat_id` INT( 10 ) DEFAULT NULL ,
 `b_tags` TEXT,
 `b_user_id` BIGINT( 20 ) DEFAULT NULL ,
 `b_isactive` TINYINT( 1 ) DEFAULT  '0' COMMENT  'admin will approve it',
 `b_created_on` DATETIME DEFAULT NULL ,
 `b_views` BIGINT( 20 ) DEFAULT  '0' COMMENT  'number of times this is viewed',
PRIMARY KEY (  `b_id` )
) ENGINE = MYISAM AUTO_INCREMENT =764 DEFAULT CHARSET = utf8;

MySQL said: Documentation

#1046 - No database selected

在phpMyAdmin中创建新数据库或选择现有数据库。然后导入SQL文件


在sql脚本的第一行中包含以下行

create database database_name;
use database_name;

您尚未选择要在其中创建表并开始导入的数据库。这就是为什么会出现这种错误

在转到查询窗口并执行查询之前,应该单击要导入的数据库。 另一个选项是选择数据库,如下所示:

    USE `database_name`;
    CREATE TABLE `business` (
      `b_id` bigint(20) NOT NULL AUTO_INCREMENT,
      `b_title` text,
      `b_lastmodified` datetime DEFAULT NULL,
      `b_detail` text,
      `b_banner_image` varchar(250) DEFAULT NULL,
      `b_cat_id` int(10) DEFAULT '100',
      `b_subcat_id` int(10) DEFAULT NULL,
      `b_tags` text,
      `b_user_id` bigint(20) DEFAULT NULL,
      `b_isactive` tinyint(1) DEFAULT '0' COMMENT 'admin will approve it',
      `b_created_on` datetime DEFAULT NULL,
      `b_views` bigint(20) DEFAULT '0' COMMENT 'number of times this is viewed',
      PRIMARY KEY (`b_id`)
    ) ENGINE=MyISAM AUTO_INCREMENT=764 DEFAULT CHARSET=utf8;

    INSERT INTO `business` (`b_id`, `b_title`, `b_lastmodified`, `b_detail`, `b_banner_image`, `b_cat_id`, `b_subcat_id`, `b_tags`, `b_user_id`, `b_isactive`, `b_created_on`, `b_views`) VALUES ('1', 'Couple Names Silver Pendant', '2014-01-15 02:25:02', '', 'itm_couple-names-silver-pendant2013-03-25_22-07-16_1.jpg', '35', '0', 'love pendant,name pictures,silver name pendant,couple name pendant,locket of love,chain of name,fb display photos', '1', '1', '2013-03-25 22:06:53', '7263');

在sql脚本的第一行中包含以下行,然后仅。。。使用数据库名称;我知道,但在我的主机上,我不能创建更多的数据库,我只允许一个数据库,如果是这样,请考虑选择正确的答案。