明明有select 權(quán)限卻報錯
MySQL> select * from server into outfile '/tmp/tt.txt';
ERROR 1045 (28000): Access denied for user 'chenliang'@'%' (using password: YES)
百度后需要給file權(quán)限
mysql> grant file on *.* to chenliang;
Query OK, 0 rows affected (0.00 sec)
再次導(dǎo)還是報錯
mysql> select * from server into outfile '/tmp/tt.txt';
ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
--這次錯誤不一樣了,這個錯誤是一個參數(shù)導(dǎo)致的
配置文件加入后重啟
secure_file_priv=''
導(dǎo)出成功
mysql> select * from server into outfile '/tmp/tt.txt';
Query OK, 27 rows affected (0.00 sec)
這個參數(shù)我以前在5.6.24版本都沒調(diào)整過,可能默認(rèn)值就是‘’,高版本默認(rèn)值改成null,所以一定要注意
文章標(biāo)題:【Mysql】intooutfile報錯的問題
當(dāng)前地址:http://aaarwkj.com/article42/gjijec.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供電子商務(wù)、定制網(wǎng)站、手機網(wǎng)站建設(shè)、軟件開發(fā)、定制開發(fā)、網(wǎng)頁設(shè)計公司
廣告
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源:
創(chuàng)新互聯(lián)