如果有 SUPER 权限,则可以看到全部的线程,否则,只能看到自己发起的线程(这是指,当前对应的 MySQL 帐户运行的线程). mysql> show processlist; +—–+————-+——————–+ | Id | User | Host | db | Command | Time| State | Info +—–+————-+——————–+ |207|root |192.168.0.2:51621 |mytest | Sleep | 5 | | NULL |208|root
The thread has called mysql_lock_tables() and the thread state has not been updated since. This is a very general state that can occur for many reasons. For example, the thread is going to request or is waiting for an internal or external system lock
多线程复制 多线程复制MTS(Mult-Threaded Slave Applier)指使用多个线程来并发应用二进制日志.在MYSQL5.6版本中,多线程复制基于schema来实现,将多个数据库下的事务按照数据库拆分到多个线程上执行,保证数据库级别的事务一致性.在MYSQL5.7版本后,多线程复制基于主库上并发信息来实现,主库上并发提交的事务不存在事务冲突,在从库上拆分到多个线程执行,保证实例级别的事务一致性. 设置和多线程复制类型和复制线程数: ##设置多线程复制类型和复制线程数: SET G