Chinaunix首页 | 论坛 | 博客
  • 博客访问: 23351
  • 博文数量: 16
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 150
  • 用 户 组: 普通用户
  • 注册时间: 2015-07-11 16:41
个人简介

运维工程师+DBA

文章分类

全部博文(16)

文章存档

2015年(16)

我的朋友

发布时间:2015-07-21 20:26:54

操作系统CentOS 6.5 minimal<br />node1:192.168.2.54<br />node2:192.168.2.55<br />node3:192.168.2.56<br /><br /><br />一、添加repo源和epel源<br />在三台节点上运行:<br />#yum -y install http://www.percona.com/downloads/percona-release/percona-release-0.0-1.x86_64.rpm<br />#rpm -ivh http://dl..........【阅读全文】

阅读(877) | 评论(0) | 转发(0)

发布时间:2015-07-14 20:52:26

1.给某字段添加索引<br />alter table test add index idx_id(`id`);<br />2.删除某表主键<br />alter table test drop primary key;<br />3.给已经存在的表添加主键<br />&nbsp;alter table test add primary key (`id`);<br />4.添加自增列并设置该列为主键<br />&nbsp;alter table test add auto_id &nbsp;bigint.........【阅读全文】

阅读(368) | 评论(0) | 转发(0)

发布时间:2015-07-13 11:33:49

select 1 from table,不查询具体的列的内容,只要有值就显示为1.
实例:
mysql>create table t1(id int);
mysql>insert into  t1 values(2);
mysql&g.........【阅读全文】

阅读(768) | 评论(0) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册