1、开启和关闭mysql> set profiling=1;mysql> set profiling=0; information_schema 的 database 会建立一个PROFILING 的 table 记录. 2、执行一些语句(自定义语句)mysql>select * from navi ...
分类:
数据库 时间:
2016-03-31 16:59:06
阅读次数:
219
-- 查看指定数据库的表信息 -- 查看会话连接信息 -- CHARACTER_SETS 查看数据库支持的字符集 -- COLLATIONS 字符序 -- 查看表结构定义信息 show columns from employees from employees; desc employeees.em ...
分类:
数据库 时间:
2016-03-31 12:52:21
阅读次数:
499
GRANT ALL PRIVILEGES ON {db_name}.* TO {username}@'{host}' identified by '{password}'; ALL PRIVILEGES --所有权限 information_schema.SCHEMA_PRIVILEGES --权限
分类:
数据库 时间:
2016-03-11 14:00:28
阅读次数:
195
1. 查询某个表中所有非空字段名 SELECT `COLUMN_NAME` FROM `information_schema`.`COLUMNS` WHERE `IS_NULLABLE` = 'No' AND `TABLE_NAME` = 'feed' AND `TABLE_SCHEMA` = 'p
分类:
数据库 时间:
2016-03-09 17:22:57
阅读次数:
212
介绍商业及代码生成器,如何自己手写代码生成器 SELECT * from information_schema.`TABLES` WHERE TABLE_TYPE='base Table' and `ENGINE`='InnoDb' and TABLE_SCHEMA='rpcaterdb' SELE
分类:
Web程序 时间:
2016-03-05 13:08:57
阅读次数:
192
mysql查看表结构命令,如下:desc 表名;show columns from 表名;describe 表名;show create table 表名; use information_schema; #切换到information_schema数据库select * from columns
分类:
数据库 时间:
2016-03-04 13:07:34
阅读次数:
213
一:杀掉mysql连接的方法: kill thread_id: 杀掉当前进程,断开连接 kill query thread_id: 只杀掉某连接当前的SQL,而不断开连接。 批量杀死MySQL连接的几种方法: 1> 通过information_schema.processlist表中的连接信息生成需
分类:
数据库 时间:
2016-03-02 14:48:14
阅读次数:
212
场景:mysql无法执行select命令查询,对于已存在的数据库,除了mysql、information_schema数据库,其它诸如nova、keystone、cinder等数据库都有此现象。 日志报如下错误: 此时执行: >create database db; >create table pe
分类:
数据库 时间:
2016-02-29 21:40:44
阅读次数:
303
SELECT a.name, b.COLUMN_NAME, '1' AS aflagFROM sys.tables aLEFT JOIN information_schema.columns b ON b.table_name=a.name AND b.COLUMN_NAME IN('scantim...
分类:
其他好文 时间:
2016-02-23 11:26:23
阅读次数:
236
说明:使用mysqldump –all-databases会导出所有库。但如果做主从,从主库dump出数据时,我们是不需要也不想要information_schema 和 mysql 库的。数据库少的情况下还可以通过/usr/local/mysql/bin/mysqldump -uroot -p -
分类:
数据库 时间:
2016-02-22 12:05:30
阅读次数:
257