MySQL->导出/导入资料[20180521]
.png)

.png)

.png)
mysql> select count(*) from seq_test;
+----------+
| count(*) |
+----------+
| 111 |
+----------+
1 row in set (0.00 sec) mysql> truncate table seq_test;
Query OK, 0 rows affected (0.00 sec) mysql> LOAD DATA LOCAL INFILE '/tmp/backup_v0.txt' INTO TABLE seq_test;
Query OK, 111 rows affected (0.00 sec)
Records: 111 Deleted: 0 Skipped: 0 Warnings: 0 mysql> select count(*) from seq_test;
+----------+
| count(*) |
+----------+
| 111 |
+----------+
1 row in set (0.00 sec)
.png)
[root@t-xi-mysql01 tmp]# cp backup_v0.txt seq_test.txt[root@t-xi-mysql01 tmp]# mysqlimport -u root -p --local runoob seq_test.txtEnter password:runoob.seq_test: Records: 111 Deleted: 0 Skipped: 111 Warnings: 0
[root@t-xi-mysql01 tmp]# mysqldump -u root -p runoob seq_test|gzip > backup_data.zip
Enter password:
[root@t-xi-mysql01 tmp]# gunzip -c backup_data.zip>backup_data.sql
[root@t-xi-mysql01 tmp]#
[root@t-xi-mysql01 tmp]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 18
Server version: 5.1.71 Source distribution Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> use runoob;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A Database changed
mysql> source backup_data.sql
Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 111 rows affected (0.00 sec)
Records: 111 Duplicates: 0 Warnings: 0 Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec)
mysql> select count(*) from seq_test;
+----------+
| count(*) |
+----------+
| 111 |
+----------+
1 row in set (0.00 sec)
MySQL->导出/导入资料[20180521]的更多相关文章
- [转]mysql导出导入中文表解决方法
在开发过程中会经常用到mysql导出导入中文表,本文将详细介绍其如何使用,需要的朋友可以参考下. 在开发过程中会经常用到mysql导出导入中文表,本文将详细介绍其如何使用,需要的朋友可以参考下一.先针 ...
- mysql导出导入某张表
一般表数据少的话都用图形界面了,看着比较方便. 如果表中数据比较多,用图形界面极容易卡死,这个时候就要用到命令行了. 用命令行导出导入大量数据还是比较快的,方法如下: 导出库db1中的表table1: ...
- Mysql导出导入乱码问题解决
MySQL从4.1版本开始才提出字符集的概念,所以对于MySQL4.0及其以下的版本,他们的字符集都是Latin1的,所以有时候需要对mysql的字符集进行一下转换,MySQL版本的升级.降级,特别是 ...
- mysql导出导入数据
使用sql语句导出数据: 导出时如果不写绝对路径,会提示The MySQL server is running with the --secure-file-priv option so it can ...
- mysql导出导入数据库表
1.下载数据库 mysqldump db_name -h 192.168.5.162 -uroot -p > /var/www/db_name.sql(这个可以自定义) 2,下载数据库中的某个 ...
- Mysql 导出导入
MySQL数据库导出 以root登录vps,执行以下命令导出. 1./usr/local/mysql/bin/mysqldump -u root -p123456 zhumaohai > /ho ...
- MySQL导出导入命令的用例
1.导出整个数据库 mysqldump -u 用户名 -p 数据库名 > 导出的文件名 mysqldump -u wcnc -p smgp_apps_wcnc > wcnc.sql 2.导 ...
- mysql 导出导入数据 -csv
MySql数据库导出csv文件命令: mysql> select first_name,last_name,email from account into outfile 'e://output ...
- mysql导出导入数据库和表学习笔记
一.mysql导出数据库和表 1.导出单个数据库 mysqldump [-h Host] -u Username -p [PASSWORD] db_name > db_name.sql 2.导出 ...
随机推荐
- Flutter知识点:数据存储之sqflite
sqflite是一款轻量级的关系型数据库,类似SQLite. 在Flutter平台我们使用sqflite库来同时支持Android 和iOS. 使用介绍 1.首选需要在pubspec.yaml 导入库 ...
- integer storage and decimal storage differences in java
package storage.java; public class StorageJava { public static void main(String[] args) { byte b = 1 ...
- CPU纯软件全虚拟化技术
我们在前面的文章中提到了虚拟化技术的大致分类情况,即分为全虚拟化.半虚拟化和硬件辅助虚拟化3大类.而我们虚拟化技术最主要的虚拟主体就是我们的硬件CPU.内存和IO,那么我们的CPU在全虚拟化模式下如何 ...
- C#跨线程调用窗体控件(比如TextBox)引发的线程安全问题
如何:对 Windows 窗体控件进行线程安全调用 访问 Windows 窗体控件本质上不是线程安全的. 如果有两个或多个线程操作某一控件的状态,则可能会迫使该控件进入一种不一致的状态. 还可能会出现 ...
- xml-treeview转换
XML——>treeciew using System; using System.Collections.Generic; using System.Text; using System.Wi ...
- Linux iptables命令详解
iptables命令主要是设置防火墙信息的 常见命令参数 Usage: iptables -[AD] chain rule-specification [options] iptables -I ch ...
- INSERT CLAUSE
a.single table insert INSERT INTO jobs(job_id,job_title,min_salary,Max_Salary) VALUES('IT_PM','PROJE ...
- 转 linux设置开机服务自动启动/关闭自动启动命令 chkconfig
原文连接http://blog.csdn.net/jiangguilong2000/article/details/8259360 chkconfig命令主要用来更新(启动或停止)和查询系统服务的运行 ...
- 在 ServiceModel 客户端配置部分中,找不到引用协定“myservice.Service1Soap”的默认终结点元素。这可能是因为未找到应用程序的配置文件,或者是因为客户端元素中找不到与此协定匹配的终结点元素。
在做项目的时候遇到这个问题,当我在web网站中引用webservice时,很正常,但是当我在一个类库里引用并调用webservice方法后,然后网站调用这个类库里的方法,就会报标题这样的错误.最后纠结 ...
- Java并发案例02---生产者消费者问题
package example; import java.util.LinkedList; import java.util.concurrent.TimeUnit; public class MyC ...