系统变量和参数


sql_mode

select @@sql_mode;#定义了mysql应该支持的sql语法,数据校验等,应该设置为严格模式

查看字符集与校对集

show variables LIKE 'character_set%';#查看当前mysql系统字符集
show create database 数据库名;#查看指定数据库的字符集
-------------
use 数据库名;
#校对集(意义:区分大小写)_ci不区分大小写,_bin,_cs区分大小写,如果表中已经有数据,修改校对集无效
show variables like 'collation_database';# 查看当前选中的数据库校对集
-------------

查看系统状态

status

调试-查看sql执行时间

select @@profiling;#查看是否开启
set profiling = 1;#设置为1,开启
show profiles;#查看每条sql语句的执行时间

查看行锁和表锁情况

show status like 'innodb_row_lock%';#查看系统行锁情况
show status like 'table_lock%';查看系统表锁情况

查看当前数据客服端连接状态

show processlist;

sql_mode

asdfasdf

sql_mode

asdfasdf

results matching ""

    No results matching ""