文件首頁
MySQL Connector/Python 開發者指南
相關文件 下載本手冊
PDF (US Ltr) - 0.7Mb
PDF (A4) - 0.7Mb


10.2.16 MySQLConnection.cmd_refresh() 方法

語法

cnx.cmd_refresh(options)
棄用

此 MySQL 伺服器功能已棄用。

此方法會清除表格或快取,或重設複寫伺服器資訊。連線的使用者必須具有 RELOAD 權限。

options 引數應該是使用 constants.RefreshOption 類別中的常數建構的位元遮罩值。

如需選項清單,請參閱第 10.11 節,「constants.RefreshOption 類別」

範例

>>> from mysql.connector import RefreshOption
>>> refresh = RefreshOption.LOG | RefreshOption.THREADS
>>> cnx.cmd_refresh(refresh)