亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

MYSQL導入數據報錯

MYSQL導入數據報錯

慕標琳琳 2018-09-05 23:09:51
開始導入MYSQL導入數據出現The MySQL server is running with the --secure-file-priv option查了一下說是Mysql的導入導出路徑目錄問題,改了my.ini文件中的secure-file-priv值為secure-file-priv=""現在執行SQL導入報錯如下:mysql> load data infile 'E:\sql\film_test.txt' into table film_test2;ERROR 29 (HY000): File 'E:\sqlfilm_test.txt' not found (OS errno 2 - No such file or directory)文件路徑是對的呢,怎么會報錯找不到
查看完整描述

2 回答

?
陪伴而非守候

TA貢獻1757條經驗 獲得超8個贊

你的MySQL是什么版本,自己編譯的嗎?
對這個參數有點印象,MySQL官方說明中對其有介紹,默認設置為NULL,據說會禁止數據導入導出;也有設置成DINSTALL_SECURE_FILE_PRIVDIR=/usr/local/mysql/mysql-files這樣的非NULL,包括空值,不過空值會有問題:

A non-NULL value is considered insecure if it is empty, or the value is the data directory or a subdirectory of it, or a directory that is accessible by all users. If secure_file_priv is set to a nonexistent path, the server writes an error message to the error log and exits.

大體這意思是說,最好指向一個真實存在的目錄,且系統用戶均可訪問。我記得說明手冊上寫的范例是在/usr/local/mysql這個目錄下新建。


查看完整回答
反對 回復 2018-09-09
  • 2 回答
  • 0 關注
  • 895 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號