MySQL you *might* want to use the less safe log_bin_trust_function_creators variable

來源:互聯網
上載者:User

標籤:

因為在開啟記錄檔情況下執行以前建立的 自訂函數報錯詳細分析如下:

     1 .調用自訂函數

     mysql>  select sp_function_dbdh_three();  #以前自訂的函數

    2. 報錯資訊:
     ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL, or READS SQ
    L DATA in its declaration and binary logging is enabled (you *might* want to use
    the less safe log_bin_trust_function_creators variable)

    3. 根據錯誤提示做下列查詢

   

   4. 設定開啟狀態

         SET GLOBAL log_bin_trust_function_creators = 1;

   5. 資料庫服務重啟後發現調用報錯,根據經驗需要設定環境全域變數設定方法如下

        (1) 在初始化參數的 [mysqld] 節加上:log_bin_trust_function_creators=1如下所示

            

        (2) 做相關函數查詢如下:說明參數啟作用.

         

 通過以上執行個體說明在開機記錄操作後對函數的操作需要設定參數值否則無法使用.

MySQL you *might* want to use the less safe log_bin_trust_function_creators variable

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.