日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

mysql数据库-1.文件导入mysql表secure_file_priv报错问题解决 mysql select outfile不能导出亲测

發布時間:2024/9/20 数据库 26 豆豆
生活随笔 收集整理的這篇文章主要介紹了 mysql数据库-1.文件导入mysql表secure_file_priv报错问题解决 mysql select outfile不能导出亲测 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1.問題
Mac系統,將文件導入mysql表中,報錯secure_file_priv選項未設置。
執行導入文件到表mobile_attribute_jxl命令時:
load data infile ‘/home/dm_mobile.txt' into table mobile_attribute_jxl fields terminated by ',' lines terminated by '\n';

報錯:
Error: The MySQL server is running with the --secure-file-priv option so it cannot execute this statement

2.解決方案
SHOW VARIABLES LIKE "secure_file_priv”;
發現其值為NULL,此時需要在修改secure_file_priv的設置
secure_file_prive=null ? -- 限制mysqld 不允許導入導出
secure_file_priv=/tmp/ ? -- 限制mysqld的導入導出只能發生在/tmp/目錄下
secure_file_priv='' ? ? -- 不對mysqld 的導入 導出做限制

1.找到 /private/etc/my.cnf
2.在my.cnf中添加加粗部分語句即可
[mysqld]
max_connections=1024
secure_file_priv=''
[mysql]
Default-character-set=utf8mb4
3.重啟mysql服務器
重新導入即可
---------------------?
作者:JackieChen1992?
來源:CSDN?
原文:https://blog.csdn.net/cshichunhua/article/details/78535755?utm_source=copy?
版權聲明:本文為博主原創文章,轉載請附上博文鏈接!

來源:https://blog.csdn.net/cshichunhua/article/details/78535755

總結

以上是生活随笔為你收集整理的mysql数据库-1.文件导入mysql表secure_file_priv报错问题解决 mysql select outfile不能导出亲测的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。