查看innodb引擎状态
可用于查看死锁情况:
show engine innodb status;
查看锁情况
表锁:show global status like ‘table_locks%’;
行锁:show global status like ‘innodb_row_lock%’;
文件打开数
show global status like ‘open_files’;
查看慢查询
show full processlist;
SELECT * FROM information_schema.INNODB_TRX;
select @@autocommit;
设置对应的编码
set character_set_server=utf8;
查看数据库编码
SHOW VARIABLES LIKE ‘character%’;