Home > Database > navicat > How to export the database in navicat

How to export the database in navicat

angryTom
Release: 2019-08-19 11:46:02
Original
16207 people have browsed it

How to export the database in navicat

Navicat is a set of fast, reliable and relatively cheap database management tools, designed to simplify database management and reduce system management costs. Below we will introduce to you how to use naviact to export the database.

Recommended tutorial: navicat graphic tutorial

Use Navicat to connect to mysql, and then select what you want to export Right-click on the database, select Dump SQL File..., name it as data name.sql, and save it locally. As shown below:

●Select the dump SQL file...

How to export the database in navicat

●Save to local: database name.sql

How to export the database in navicat

●Save successfully

How to export the database in navicat

Contents in usersinfo.sql:

/*
Navicat MySQL Data Transfer

Source Server         : localhost_3306
Source Server Version : 50508
Source Host           : localhost:3306
Source Database       : usersinfo

Target Server Type    : MYSQL
Target Server Version : 50508
File Encoding         : 65001

Date: 2018-07-03 15:42:50
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for `student`
-- ----------------------------
DROP TABLE IF EXISTS `student`;
CREATE TABLE `student` (
  `学号` varchar(20) NOT NULL DEFAULT '',
  `姓名` varchar(20) DEFAULT NULL,
  `性别` varchar(20) DEFAULT NULL,
  `专业` varchar(40) DEFAULT NULL,
  `年级` varchar(20) DEFAULT NULL,
  `出生` varchar(255) DEFAULT NULL,
  `课程` varchar(255) DEFAULT NULL,
  `成绩` double DEFAULT NULL,
  PRIMARY KEY (`学号`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

-- ----------------------------
-- Records of student
-- ----------------------------
INSERT INTO `student` VALUES ('B1', '小丽', '男', '计算机科学与技术', '大二', '1996', '高等数学', '500');
INSERT INTO `student` VALUES ('H1000', '小郭', '女', '计算机科学与技术', '大二', '1999', '高等数学', '100');
INSERT INTO `student` VALUES ('H1234', '小兰', '男', '计算机科学以与技术', '大三', '1997', '高等数学', '200');
Copy after login

You can see that the above are all sql Statements include statements that create a table and statements that insert rows of data into the table. Note that usersinfo.sql only contains information about the tables in the original usersinfo database, and no information about the database itself. Therefore, when we import the sql file later, we need to first create a database named: "usersinfo".

The above is the detailed content of How to export the database in navicat. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template