MySQL基础 二
2016-04-22 21:37
531 查看
一用户管理
1. 创建用户 create user xxx identified by ‘password’;
2. 删除用户 drop user xxx;
3. 重命名用户 rename user xxx to xxxx;
4. 修改当前用户密码 setpassword=password(‘xxxx’);
5. 修改其他用户密码 setpassword for xxx =password(‘xxx’);
二 权限系统
1. 连接权限
2. 动作权限
权限级别:
1. 全局
2. 数据库
3. 表
4. 列
5. 子程序
Grant all privileges on *.* to ‘xxx’@’%’identified by ‘xxx’;
Revoke all privileges on *.* from ‘xxx’@’xxx’identified by ‘xxx’;
三简单备份
1. Mysqldum–uroot –p 需要备份的库>备份
2. Source 路径/备份
四数据库编码
1. 查询mysql支持的编码 showcharacter set;
2. 查询MySQL使用的编码 showvariables like ‘character%’;
1. 创建用户 create user xxx identified by ‘password’;
2. 删除用户 drop user xxx;
3. 重命名用户 rename user xxx to xxxx;
4. 修改当前用户密码 setpassword=password(‘xxxx’);
5. 修改其他用户密码 setpassword for xxx =password(‘xxx’);
二 权限系统
1. 连接权限
2. 动作权限
权限级别:
1. 全局
2. 数据库
3. 表
4. 列
5. 子程序
Grant all privileges on *.* to ‘xxx’@’%’identified by ‘xxx’;
Revoke all privileges on *.* from ‘xxx’@’xxx’identified by ‘xxx’;
三简单备份
1. Mysqldum–uroot –p 需要备份的库>备份
2. Source 路径/备份
四数据库编码
1. 查询mysql支持的编码 showcharacter set;
2. 查询MySQL使用的编码 showvariables like ‘character%’;
相关文章推荐
- mybatis连接mysql
- mac mysql 中文数据无法输入到数据库里
- mysql中cmake常用参数说明 和 编译安装mysql
- MySQL设计软件登录模块
- MySQL设计软件登录模块
- 【MySQL】存储过程、游标、循环简单实例
- Mysql执行计划查看
- mysql - 内存表使用总结
- hibernate mysql查询首字母排序两表连接外键
- mysql 存储过程while循环插入语句
- 利用mycat实现基于mysql5.5主从复制的读写分离
- 利用mycat实现基于mysql5.5主从复制的读写分离
- MYSQL 的SQL 语句用法大全
- sqlite、mysql和postgresql对比
- 使用mysqladmin命令修改Mysql密码
- 第一次配置mysql是出现错误:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
- 使用mysqladmin命令修改Mysql密码
- ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
- 记录一下mysql的递归。。
- mysql添加用户