摘要: 查看mysql中所有的用户及权限(只有root权限才能看)。 mysql> select distinct concat(user,host) from mysql.user; union select 1,2,3 失败 union select 1,2,3,4 成功 查看该用户的所有数据库 uni 阅读全文
posted @ 2018-03-24 20:12 cui0x01 阅读(257) 评论(1) 推荐(0) 编辑
摘要: 1、增 语法:insert into 表 (列名,列名...) values (值,值...) # 插入单条数据 insert into 表 (列名,列名...) values (值,值...) # 插入多条数据 insert into 表 (列名,列名...) values (值,值...),(值 阅读全文
posted @ 2018-03-24 18:32 cui0x01 阅读(279) 评论(0) 推荐(0) 编辑
摘要: 1、创建表 # 基本语法: create table 表名( 列名 类型 是否可以为空 默认值 自增 主键, 列名 类型 是否可以为空 )ENGINE=InnoDB DEFAULT CHARSET=utf8 not null # 不可以为空 default 1 # 默认值为1 auto_increm 阅读全文
posted @ 2018-03-24 17:36 cui0x01 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 1、查看数据库 show databases; # 默认数据库: test - 用于用户测试数据 information_schema - MySQL本身架构相关数据 2、创建数据库 #utf-8 编码 create database 数据库名称 default charset utf8 colla 阅读全文
posted @ 2018-03-24 16:24 cui0x01 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 0.产看mysql信息 status; 1.整个命令写错 可以在后面输入 \c 取消执行 2.单行命令写错 可以按esc键清除某行 3.给某个数据库创建单独管理员和密码 grant all on houdunwang.* to "hdw"@"localhost" identified by "hdw 阅读全文
posted @ 2018-03-24 15:58 cui0x01 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 一. 创建用户 登录MySQL mysql -u root -p 添加新用户 create user 'username'@'host' identified by 'password'; username:你将创建的用户名 host:指定该用户在哪个主机上可以登陆,如果是本地用户可用localho 阅读全文
posted @ 2018-03-24 14:25 cui0x01 阅读(131) 评论(0) 推荐(0) 编辑