MYSQL匯入資料出現The MySQL server is running with the --secure-file-priv

來源:互聯網
上載者:User

標籤:匯入資料   mysql   running   技術分享   lib   variable   png   許可權   出現   

MYSQL匯入資料出現The MySQL server is running with the --secure-file-priv option so it cannot execute this statement

方法一:

這個原因其實很簡單,是因為在安裝MySQL的時候限制了匯入與匯出的目錄許可權

只能在規定的目錄下才能匯入

我們需要通過下面命令查看 secure-file-priv 當前的值是什麼

show variables like ‘%secure%‘;

 

我們可以看到value的值為/var/lib/mysql-files/

那麼我們把匯入的路徑改為上面的值就可以了

方法二:

  如果覺得這樣太麻煩,那麼我們就需要改設定檔,找到my.ini設定檔,修改路徑,重啟

MYSQL匯入資料出現The MySQL server is running with the --secure-file-priv

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.