从转储文件还原mysql数据库未知数据库错误

| 我无法从转储文件还原。如果转储文件不存在,则可以选择它来构建数据库。那么,为什么下面的脚本仅在拥有数据库的情况下才起作用。 mysql -u root -p1234 modal_db
-- MySQL dump 10.13  Distrib 5.5.8, for Win32 (x86)
--
-- Host: localhost    Database: modal_db
-- ------------------------------------------------------
-- Server version   5.5.8-log

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE=\'+00:00\' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=\'NO_AUTO_VALUE_ON_ZERO\' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Current Database: `modal_db`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `modal_db` /*!40100 DEFAULT CHARACTER SET latin1 */;

USE `modal_db`;

--
-- Table structure for table `user_info`
--

DROP TABLE IF EXISTS `user_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user_info` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(30) NOT NULL,
  `email` varchar(30) NOT NULL,
  `password` varchar(30) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `user_info`
--

LOCK TABLES `user_info` WRITE;
/*!40000 ALTER TABLE `user_info` DISABLE KEYS */;
INSERT INTO `user_info` VALUES (1,\'[object Object]\',\'[object Object]\',\'[object Object]\'),(2,\'amaya\',\'etongancheta@yahoo.com\',\'neato\'),(3,\'yoh\',\'yoh@yahoo.com\',\'ff2cbe54328162379ba1baf57b23f9\'),(4,\'fure\',\'fure@gmail.com\',\'263bce650e68ab4e23f28263760b9f\'),(5,\'koroja\',\'koroja@yahoo.com\',\'665b3a3829375f4acbb00858299a08\'),(6,\'maro\',\'ala@yahoo.com\',\'2f66aed2714edaa599e148990c9d16\'),(7,\'deg\',\'deg@ymail.com\',\'n\'),(8,\'mario\',\'super_mario@gmail.com\',\'c1210473c214e0cf5968bf147ed079\'),(9,\'mizuo\',\'hewajim@y.com\',\'n\'),(10,\'bakuryu\',\'bakuryu@b.com\',\'b\'),(11,\'maron\',\'m@yahoo.com\',\'m\'),(12,\'gatou\',\'g@y.com\',\'g\'),(13,\'mocha\',\'mo@y.com\',\'mo\'),(14,\'pizza\',\'pizza@gm.com\',\'gm\'),(15,\'bbq\',\'bbq@food.com\',\'food\'),(16,\'salad\',\'salad@s.com\',\'s\');
/*!40000 ALTER TABLE `user_info` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2011-06-12 21:53:48
请帮忙。如果数据库已删除,如何还原?     
已邀请:
        您的MySQL命令行正在尝试选择一个数据库,如果该数据库不存在,它将失败。您可以从命令行参数中忽略该内容,因为SQL文件正在选择带有“ 1”的数据库本身。 尝试:
mysql -u root -p1234 < c:\\wamp\\db_backups\\modal_db\\mdb.sql
    

要回复问题请先登录注册