查询当前库中用户
mysql>
select host, user from mysql.user;
删除用户
DROP USER 'testuser'@'localhost';
查询当前slave服务器状态
mysql>
show slave status\G
查询当前master服务器状态
mysql>
show master status;
跳过Slave服务器出错
mysql>
STOP SLAVE; SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; START SLAVE;
锁定MySQL服务器为只读和解锁,通常用户同步或者导出等场景
mysql>
FLUSH TABLES WITH READ LOCK;
SET GLOBAL read_only = ON;
SET GLOBAL read_only = OFF;
UNLOCK TABLES;
删除数据库”test_test”
mysql>
drop database test_test;