执行sql dump文件

时间:2016-12-24 18:50:12

标签: mysql sql database

我正在尝试创建表并添加.sql转储文件中的所有记录..

C:\Program Files\MySQL\MySQL Server 5.7\bin>mysqldump -u root -p org < database_name.sql
Enter password: ****
-- MySQL dump 10.13  Distrib 5.7.15, for Win64 (x86_64)
-- Host: localhost    Database: org
-- ------------------------------------------------------
-- Server version       5.7.15-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 */;
/*!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 2016-12-24 23:38:01

完成上述命令后...我没有在我的数据库中看到任何表。

[no tables in the database][1]

https://i.stack.imgur.com/1OhTU.png

谢谢

1 个答案:

答案 0 :(得分:2)

而不是<body> <script> function httpGet(theURL) { var xmlHttp = new XMLHttpRequest(); xmlHttp.open("GET", theURL); xmlHttp.setRequestHeader("Content-Type", "application/json"); xmlHttp.send(null); xmlHttp.onreadystatechange = function() { var response = null; if(xmlHttp.readyState == XMLHttpRequest.DONE) { response = xmlHttp.responseText; document.getElementById("response").value = response; } }; } </script> <input id="clickMe" type="button" value="get Data" onclick="httpGet('https://api.github.com/search/users?q=rohankanojia')" /> <br> Response : <input id="response" type="label"/> </body> 使用mysqldump

mysql