在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/Linux  數(shù)據(jù)庫/ MYSQL導入數(shù)據(jù)報錯

MYSQL導入數(shù)據(jù)報錯

開始導入MYSQL導入數(shù)據(jù)出現(xiàn)The MySQL server is running with the --secure-file-priv option

查了一下說是Mysql的導入導出路徑目錄問題,改了my.ini文件中的secure-file-priv值為

secure-file-priv=""

現(xiàn)在執(zhí)行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)

文件路徑是對的呢,怎么會報錯找不到

回答
編輯回答
背叛者

你的MySQL是什么版本,自己編譯的嗎?
對這個參數(shù)有點印象,MySQL官方說明中對其有介紹,默認設(shè)置為NULL,據(jù)說會禁止數(shù)據(jù)導入導出;也有設(shè)置成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.

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

2017年10月24日 16:12
編輯回答
使勁操

有個軟件叫 Navicat

2018年3月23日 01:34