本文转自:http://blog.sina.com.cn/s/blog_4c197d420101fbl9.html 查看所有库的大小 mysql> use information_schema; Database changed mysql> select concat(round(sum(DATA ...
分类:
数据库 时间:
2018-06-06 18:21:50
阅读次数:
205
SELECT CONCAT( 'drop table ', table_name, ';' ) FROM information_schema. TABLES WHERE table_schema = 'dbname' AND table_name LIKE 'sth_%'; ...
分类:
其他好文 时间:
2018-06-05 13:21:02
阅读次数:
115
先安装npm模块项目 安装mysql Nodejs 连接msyql 增 删 改 查 ...
分类:
数据库 时间:
2018-05-31 19:32:20
阅读次数:
179
-- 查询某数据库中所有表及其记录数SELECT table_name,table_rows FROM information_schema.tablesWHERE TABLE_SCHEMA = 'awreporting'ORDER BY table_rows DESC; -- 查询某数据库中有某字 ...
分类:
数据库 时间:
2018-05-30 21:27:33
阅读次数:
165
1、 show processlist; 2、select * from information_schema.innodb_trx\G 3、SELECT user, host, time, command, state,left(info,4000) FROM information_schema ...
分类:
数据库 时间:
2018-05-30 16:12:31
阅读次数:
173
查看某个表所占空间,以及碎片大小。 select table_name,engine,table_rows,data_length+index_length length,DATA_FREE from information_schema.tables where TABLE_SCHEMA='tes ...
分类:
数据库 时间:
2018-05-29 10:58:23
阅读次数:
195
查找所有表的语句 select table_name from information_schema.tables where table_schema='当前数据库'; ...
分类:
数据库 时间:
2018-05-26 13:59:00
阅读次数:
175
MYSQL基本命令操作1.登录方法:mysql-uroot-p2.显示所有数据库:showdatabases;3.操作指定数据库(以information_schema为例)useinformation_schema4.显示所有的表showtables;5.显示表结构(以users表为例)discribetables;6.查询所有数据库的大小:selectconcat(round(sum(data
分类:
数据库 时间:
2018-05-23 15:00:12
阅读次数:
208
##msyql事务 1.mysql:传统理解 mysql 中的一次操作过程(sql 执行)是一次事务。 2.mysql:那么多个线程 同时操作 mysql 中的数据(同一条数据,一个范围内数据)就叫并发事务。 3.mysql:数据库层面使用不同的事务隔离级别来进行并发事务的控制,不同的隔离级别是因为 ...
分类:
其他好文 时间:
2018-05-17 22:03:12
阅读次数:
167
查询 正在执行的事务:SELECT * FROM information_schema.INNODB_TRX 根据这个事务的线程ID(trx_mysql_thread_id):可以使用mysql命令:kill 线程id 杀掉线程 查询 正在执行的事务:SELECT * FROM informatio ...
分类:
数据库 时间:
2018-05-17 19:15:42
阅读次数:
184