MySQL知识点技能点总结贴--个人版!
时间:2011-09-08
来源:互联网
每天进步一点点
1,2011-09-08
-- ===============================================================
-- mysql root 管理软件
-- ===============================================================
监控并发软件:Mysqlslap
-- ===============================================================
-- 查询数据库的字符集合
-- ===============================================================
select distinct table_schema,table_collation from information_schema.TABLES
where table_schema not in
('performance_schema','sys','test','mysql','information_schema');
select distinct table_schema,table_collation, table_name from information_schema.TABLES
where table_schema not in
('performance_schema','sys','test','mysql','information_schema') ;
-- 修改表的字符集
alter table cam.account charset utf8;
-- 建库
delimiter $$
CREATE DATABASE `csf_fdp` /*!40100 DEFAULT CHARACTER SET utf8 */$$
2, 2011-09-08
-- ===============================================================
-- 设置mysql slow log 开启select语句检测
-- ===============================================================
long_query_time = 1
log-slow-queries = /usr/local/mysql/data/slow.log
log-queries-not-using-indexes
在线关闭slow log
set global slow_query_log='off';
show variables like '%slow%';
SELECT * FROM `test`.`report_data` order by rpt_post_time desc limit 10,100000;
-- slow log 没有写入记录
在线开启slow log
set global slow_query_log='on';
show variables like '%slow%';
SELECT * FROM `test`.`report_data` order by rpt_post_time desc limit 20,100000;
-- slow log 有写入记录
5.1.40以上肯定支持的,set global slow_query_log='off'; set global slow_query_log='on';
[ 本帖最后由 mchdba 于 2011-9-8 11:17 编辑 ]
1,2011-09-08
-- ===============================================================
-- mysql root 管理软件
-- ===============================================================
监控并发软件:Mysqlslap
-- ===============================================================
-- 查询数据库的字符集合
-- ===============================================================
select distinct table_schema,table_collation from information_schema.TABLES
where table_schema not in
('performance_schema','sys','test','mysql','information_schema');
select distinct table_schema,table_collation, table_name from information_schema.TABLES
where table_schema not in
('performance_schema','sys','test','mysql','information_schema') ;
-- 修改表的字符集
alter table cam.account charset utf8;
-- 建库
delimiter $$
CREATE DATABASE `csf_fdp` /*!40100 DEFAULT CHARACTER SET utf8 */$$
2, 2011-09-08
-- ===============================================================
-- 设置mysql slow log 开启select语句检测
-- ===============================================================
long_query_time = 1
log-slow-queries = /usr/local/mysql/data/slow.log
log-queries-not-using-indexes
在线关闭slow log
set global slow_query_log='off';
show variables like '%slow%';
SELECT * FROM `test`.`report_data` order by rpt_post_time desc limit 10,100000;
-- slow log 没有写入记录
在线开启slow log
set global slow_query_log='on';
show variables like '%slow%';
SELECT * FROM `test`.`report_data` order by rpt_post_time desc limit 20,100000;
-- slow log 有写入记录
5.1.40以上肯定支持的,set global slow_query_log='off'; set global slow_query_log='on';
[ 本帖最后由 mchdba 于 2011-9-8 11:17 编辑 ]
作者: mchdba 发布时间: 2011-09-08
-- ===============================================================
-- mysql root 管理软件
-- ===============================================================
监控并发软件:Mysqlslap
-- ===============================================================
-- 查询数据库的字符集合
-- ===============================================================
select distinct table_schema,table_collation from information_schema.TABLES
where table_schema not in
('performance_schema','sys','test','mysql','information_schema');
select distinct table_schema,table_collation, table_name from information_schema.TABLES
where table_schema not in
('performance_schema','sys','test','mysql','information_schema') ;
-- 修改表的字符集
alter table cam.account charset utf8;
-- 建库
delimiter $$
CREATE DATABASE `csf_fdp` /*!40100 DEFAULT CHARACTER SET utf8 */$$
-- mysql root 管理软件
-- ===============================================================
监控并发软件:Mysqlslap
-- ===============================================================
-- 查询数据库的字符集合
-- ===============================================================
select distinct table_schema,table_collation from information_schema.TABLES
where table_schema not in
('performance_schema','sys','test','mysql','information_schema');
select distinct table_schema,table_collation, table_name from information_schema.TABLES
where table_schema not in
('performance_schema','sys','test','mysql','information_schema') ;
-- 修改表的字符集
alter table cam.account charset utf8;
-- 建库
delimiter $$
CREATE DATABASE `csf_fdp` /*!40100 DEFAULT CHARACTER SET utf8 */$$
作者: mchdba 发布时间: 2011-09-08
-- ===============================================================
-- 设置mysql slow log 开启select语句检测
-- ===============================================================
long_query_time = 1
log-slow-queries = /usr/local/mysql/data/slow.log
log-queries-not-using-indexes
在线关闭slow log
set global slow_query_log='off';
show variables like '%slow%';
SELECT * FROM `test`.`report_data` order by rpt_post_time desc limit 10,100000;
-- slow log 没有写入记录
在线开启slow log
set global slow_query_log='on';
show variables like '%slow%';
SELECT * FROM `test`.`report_data` order by rpt_post_time desc limit 20,100000;
-- slow log 有写入记录
5.1.40以上肯定支持的,set global slow_query_log='off'; set global slow_query_log='on';
-- 设置mysql slow log 开启select语句检测
-- ===============================================================
long_query_time = 1
log-slow-queries = /usr/local/mysql/data/slow.log
log-queries-not-using-indexes
在线关闭slow log
set global slow_query_log='off';
show variables like '%slow%';
SELECT * FROM `test`.`report_data` order by rpt_post_time desc limit 10,100000;
-- slow log 没有写入记录
在线开启slow log
set global slow_query_log='on';
show variables like '%slow%';
SELECT * FROM `test`.`report_data` order by rpt_post_time desc limit 20,100000;
-- slow log 有写入记录
5.1.40以上肯定支持的,set global slow_query_log='off'; set global slow_query_log='on';
作者: mchdba 发布时间: 2011-09-08
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28