今天嘗試使用 into outfile導出數據的時候出現錯誤:
The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
上網查了一下,應該是mysql設置的權限,可以使用
show variables like '%secure%';查看 secure-file-priv 當前的值是什么
上面的這個“/root/”是我修改之后的,剛開始報錯的時候查看這個值是“NULL”。
我們需要在配置文件中修改這個值
然后再重啟系統就可以了。