137

数据导入导出-夜流璃雨-51CTO博客

 6 years ago
source link: http://blog.51cto.com/13399294/2067075
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
SQL数据导入基本用法格式:load data infile "导入/导出使用的目录名/文件名" into table 库.表名 fields terminated by "字段间隔符号" lines terminated by "\n";注意事项:1.字符按分隔符要与文件内容的一致。2.指定导入文件的绝对路径。3.导入数据的表字段类型要与文件字段匹配。4.禁用SElinux 例: 1.把文件的内容存储复制到导入/导出使用的目录。 #cp /etc/passwd /var/lib/mysql-files/ 2.创建表字段类型要与文件字段匹配。 3. /etc/passwd 字段分为 用户名:密码占位符 :uid :gid :描述信息 :家目录 :shell mysql>create database passwddb; mysql>create table passwddb.test( >user char(20), >password char(1), >uid int(2), >gid int(2)

Recommend

  • 80

    索引的类型:1.INDEX:普通索引2.PRIMARY KEY:主键3.UNIQUE:唯一索引4.FOREIGN KEY:外键5.FULLTEXT:群文索引 例:建表的时候指定索引字段 -INDEX(字段1),INDEX(字段2)... mysql>create database ku; mysql>create table ku.abc( >id int(2) not...

  • 55

    常见的MySQL管工具mysql 命令行 跨平台 MySQL官方bundle包自带MySQL-Workbench 图形 跨平台 MySQL官方提供MySQL-Front 图形 Windows 开源,轻量级客户端软件phpMyAdmin 浏览器 跨平台 开源,需LAMP平台Navicat 图形 Windows 专业、功能强大、商业版PhpMyAdmin部署...

  • 130
    • blog.51cto.com 6 years ago
    • Cache

    mysql导出导入数据-陈小龙

    mysql -h 121.30.20 -u addata_r -P -pARreBOEhw9MijIEN_eP6BYKOxkTikUnlmysql -h 121.30.20 -u ad_plat_w -P -p2JoYTD3257ZWM5M_IJhuJ9FltNUZcQ8u...

  • 0
    • yuechuanx.top 3 years ago
    • Cache

    Django 导出和导入数据

    Django 导出和导入数据 dumpdata 命令: 它可以用来备份(导出)模型实例或整个数据库 ./manage.py dumpdata --help...

  • 2

    数据导入 / 导出的通用方法 谢益辉 / 2008-08-22 总有人对数据的导入 / 导出产生疑问,比如 SPSS 怎样导进 LISREL,或是 SAS 怎样导进 Stata,或是 Excel 怎样导进 R,等等。其实一般情况下这种问题并不是什么大问题,我们总是被软...

  • 4

    在日常的数据库维护工作中,经常需要对数据库进行导入导出操作,备份、分析、迁移数据都需要用到导...

  • 0
    • zhukqian.github.io 2 years ago
    • Cache

    Oracle导入导出DMF数据教程

    Oracle简介 Oracle数据库是数据的物理...

  • 3
    • forrestsu.github.io 2 years ago
    • Cache

    MySQL 数据导入导出

    MySQL 数据导入导出 2022年1月22日 | 字数 518 |

  • 8

    如何在 Linux 中导出和导入 KVM 虚拟机-51CTO.COM 如何在 Linux 中导出和导入 KVM 虚拟机 译文

  • 4

    需要提前安装mongodb-database-tools参考:centos离线安装mongodb-database-tools 常用的导出有两种:mongodump和mongoexport...

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK