网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

Linux中db命令,dba命令

Linux系统中db_loab是啥意思

保存虚拟帐号和密码的文本文件无法被系统帐号直接调用。我们需要使用db_load 命令生成db

创新互联建站专注为客户提供全方位的互联网综合服务,包含不限于成都网站制作、网站设计、思茅网络推广、微信小程序、思茅网络营销、思茅企业策划、思茅品牌公关、搜索引擎seo、人物专访、企业宣传片、企业代运营等,从售前售中售后,我们都将竭诚为您服务,您的肯定,是我们最大的嘉奖;创新互联建站为所有大学生创业者提供思茅建站搭建服务,24小时服务热线:13518219792,官方网址:www.cdcxhl.com

数据库文件

# db_load -T -t hash -f/etc/vsftpd/vsftpd_virtualuser.txt /etc/vsftpd/vsftpd_virtualuser.db

选项-T允许应用程序能够将文本文件转译载入进数据库。

-t hash使用hash码加密

-f 指定包含用户名和密码文本文件。此文件格式要示:奇数行用户名、偶数行密码

DB2数据库在linux操作系统的指令有哪些?

DB2数据库命令简介 1.启动数据库 DB2start 2.停止数据库 DB2stop DB2数据库在linux相关指令之3.连接数据库 DB2 connect to o_yd user DB2 using pwd 4.读数据库管理程序配置 DB2 get dbm cfg 5.写数据库管理程序配置 DB2 update dbm cfg using 参数名 参数值 6.读数据库的配置 DB2 connect to o_yd user DB2 using pwd DB2 get db cfg for o_yd 7.写数据库的配置 DB2 connect to o_yd user DB2 using pwd DB2 update db cfg for o_yd using 参数名 参数值 8.关闭所有应用连接 DB2 force application all DB2 force application ID1,ID2,,,Idn MODE ASYNC (DB2 list application for db o_yd show detail) 9.备份数据库 DB2 force application all DB2 backup db o_yd to d: (DB2 initialize tape on \.tape0) (DB2 rewind tape on \.tape0) DB2 backup db o_yd to \.tape0 10.恢复数据库 DB2 restore db o_yd from d: to d: DB2 restore db o_yd from \.tape0 to d: DB2数据库在linux相关指令之11.绑定存储过程 DB2 connect to o_yd user DB2 using pwd DB2 bind c:dfplus.bnd 拷贝存储过程到服务器上的C:sqllibfunction目录中 12.整理表 DB2 connect to o_yd user DB2 using pwd DB2 reorg table ydd DB2 runstats on table ydd with distribution and indexes all 13.导出表数据 DB2 export to c:dftz.txt of del select * from dftz DB2 export to c:dftz.ixf of ixf select * from dftz 14.导入表数据 import from c:123.txt of del insert into ylbx.czyxx DB2 import to c:dftz.txt of del commitcount 5000 messages c:dftz.msg insert into dftz DB2 import to c:dftz.ixf of ixf commitcount 5000 messages c:dftz.msg insert into dftz DB2 import to c:dftz.ixf of ixf commitcount 5000 insert into dftz DB2 import to c:dftz.ixf of ixf commitcount 5000 insert_update into dftz DB2 import to c:dftz.ixf of ixf commitcount 5000 replace into dftz DB2 import to c:dftz.ixf of ixf commitcount 5000 create into dftz (仅IXF) DB2 import to c:dftz.ixf of ixf commitcount 5000 replace_create into dftz (仅IXF) 15.执行一个批处理文件 DB2 -tf 批处理文件名 (文件中每一条命令用 ;结束) 16.自动生成批处理文件 建文本文件:temp.sql select 'runstats on table DB2.' || tabname || ' with distribution and detailed indexes all;' from syscat.tables where tabschema='DB2' and type='T'; DB2 -tf temp.sqlrunstats.sql 17.自动生成建表(视图)语句 在服务器上:C:sqllibmisc目录中 DB2 connect to o_yd user DB2 using pwd DB2look -d o_yd -u DB2 -e -p -c c:o_yd.txt DB2数据库在linux相关指令之18.其他命令 grant dbadm on database to user bb 19select * from czyxx fetch first 1 rows only 20DB2look -d ylbx -u DB2admin -w -asd -a -e -o a.txt21. 显示当前用户所有表 list tables 22.列出所有的系统表 list tables for system 23.查看表结构 DB2 describe select * from user.tables (实习编辑:HJ)

linux怎么连接mongodb数据库

想在shell中连接数据库,首先要在连接数据的机器上安装mongodb的客户端才可以。客户端的安装在这里不再重复,自己百度或者google一下吧。连接mongodb的命令如下:/home/test/mongodb/mongodb-2.2.3/bin/mongo 127.0.0.1:8888

这个是我的数据库配置,没有设置用户名密码。所以直接通过该命令就可以连接。

连结后会有一个默认连接的数据库。

mongodb常用命令:

查看数据库命令:

show dbs;

查看集合命令:

show collections;

切换数据库:

use databaseName;

查询数据:

db.集合名.find()

插入数据:

db.集合名.insert({name:'test',age:1});

删除:

db.test.remove();

sql="db.test.insert({name:'test',age:1});"//定义执行的sqlecho "$sql"|/home/test/mongodb/mongodb-2.2.3/bin/mongo 127.0.0.1:8888/test --shell

注意,echo命令中的格式必须这样写,管线命令后面的是是数据库安装地址 然后是ip:端口号,斜线后是数据库名称,--shell表示通过shell交互!


文章题目:Linux中db命令,dba命令
标题链接:http://bjjierui.cn/article/hoiecc.html

其他资讯