随笔分类 -  mysql

摘要:1.按照层次看帮助 “?contents”命令来显示所有可供查询的的分类 mysql> ? contentsYou asked for help about help category: "Contents"For more information, type 'help <item>', wher 阅读全文
posted @ 2017-04-15 18:19 夏天的西瓜君 阅读(284) 评论(0) 推荐(0)
摘要:创建一个数据库用户yxm,具有对sakila 数据库中所有表的SELECT/INSERT grant select,insert on sakila.* to 'yxm'@'localhost' identified by '123'; 需要将yxm的权限变更,收回INSERT,只能对数据进行SEL 阅读全文
posted @ 2017-04-15 17:50 夏天的西瓜君 阅读(184) 评论(0) 推荐(0)
摘要:1.插入记录 insert into emp(ename,hiredate,sal,deptno) values ('yxm1','2000-01-01','2000',1); 也可以不指定字段名称,如下 insert into emp values('yxm1','2000-01-01','200 阅读全文
posted @ 2017-04-15 14:10 夏天的西瓜君 阅读(299) 评论(0) 推荐(0)
摘要:1.create database yxm; //创建数据库 2.drop database yxm; //删除数据库 3.create table yxm; //创建表 4.drop table yxm;//删除表 5.alter table yxm modify yname varchar(20 阅读全文
posted @ 2017-04-12 21:47 夏天的西瓜君 阅读(228) 评论(0) 推荐(0)
摘要:两种显示表定义 mysql> desc sys_role;+ + + + + + +| Field | Type | Null | Key | Default | Extra |+ + + + + + +| ROLE_ID | varchar(100) | NO | PRI | NULL | || 阅读全文
posted @ 2017-04-08 22:21 夏天的西瓜君 阅读(5602) 评论(0) 推荐(0)
摘要:查看mysql服务 yxm:~ # netstat -nlp Active Internet connections (only servers)Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 阅读全文
posted @ 2017-04-05 21:31 夏天的西瓜君 阅读(4586) 评论(0) 推荐(0)
摘要:SUSE11 检测系统是否安装MySQL #rpm -qa | grep -i mysql若已安装过,会出现:MySQL-server-5.0.22-0.i386MySQL-client-5.0.22-0.i386那么输入以下命令删除它:#rpm -ev MySQL-server-5.0.22-0. 阅读全文
posted @ 2017-04-05 21:29 夏天的西瓜君 阅读(7445) 评论(0) 推荐(0)