MySQL Notes
来源:互联网 发布:小蜜蜂写作素材软件 编辑:程序博客网 时间:2024/05/21 09:44
给健忘的某懒人创建一个不常用命令的备忘:
1. 创建用户
create user 'username'@'localhost' identified by 'password';
grant all on dbname.* to 'username'@'localhost';
set password for 'root'@'localhost' = password('foobar');
2. 查看用户权限
select user, host, db, select_priv, insert_priv, grant_priv from mysql.db;
3. 更改auto_commit以改善性能
set autocommit = 0;
4. 查看更改后的全局变量
show variables like '%autocommit%';
5. 查看数据库所有表的记录数
use information_schema;
select table_name,table_rows from tables
where TABLE_SCHEMA = 'testdb'
order by table_rows desc;
0 0
- mysql notes
- MySQL Notes
- MySQL Notes
- MySQL Notes
- Mysql Notes
- Mysql Notes
- MySql study notes [1]
- Mysql learning notes!
- [DB] Mysql learning notes!
- MySQL Syntax Notes
- Mysql 优化 Notes
- Mysql book notes
- JBDC+mysql Notes
- Notes—MySQL(cmd)
- Notes
- notes
- Notes
- notes
- Cocos2D-x游戏开发之二十五:自定义文本读取工具类
- 央行:4月15日前停止比特币交易为失实报道
- PIC----代码无关设计
- 抽象工厂模式解析例子
- IPC基础
- MySQL Notes
- sphinx分布式配置
- 一个“蝇量级” C 语言协程库
- Android 进阶 - 进程启动分析
- Pig源码分析: 逻辑执行计划优化
- 杭电acm 1548
- ThreadLocal的使用方法
- Nand Flash基础知识与坏块管理机制的研究
- cocos2dx与iOS内存管理