1. 程式人生 > >mysql 常用的一些變數以及設定

mysql 常用的一些變數以及設定

1 批量刪除程序

     匯出檔案只能匯出到系統指定的檔案路徑,其他地方沒有許可權,可以通過以下命令檢視系統指定路徑

  • show variables like '%secure%';
  • 可以通過my.ini 檔案進行修改,修改之後需要重啟Mysql才能生效

      select concat('KILL ',id,';') from information_schema.processlist where user='root' into outfile '/tmp/a.txt';

      source /var/lib/mysql/a.txt;

2  檢視系統日誌是否開啟  

show variables like '%general_log%';
show variables like 'log_output';

show variables like '%error'; 錯誤日誌檔案