查詢processlist 排除sleep後排序時間大到小
| select id, db, user, host, command, time, state, info from
information_schema.processlist  
where 
command <> 'Sleep' order by time desc;
主從設定,從更新主位置進行同步 
 只導出表結構-d 
 給予權限及密碼1.授予slave的權限 2.授予select的權限 
 查看MYSQL所有使用者 
 更改使用者密碼 
 查詢某用戶的權限show grants from '用戶名'@'IP'; 
 
 移除帳號 
 查看slave狀態 
 
查看master狀態 
 | 
 
沒有留言:
張貼留言