MySQL Connector/Python 發行說明
語法
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)