Browsing this Thread:   1 Anonymous Users






mysql 导出 excel
#1
Just can't stay away
Just can't stay away


See User information
Mysql数据库导出到文件,提示The MySQL server is running with the --secure-file-priv option so it cannot execute this statement

一些版本的mysql对通过文件导入导出作了限制,默认不允许,
查看配置,执行mysql命令
SHOW VARIABLES LIKE "secure_file_priv";
如果value值为null,则为禁止,如果有文件夹目录,则只允许改目录下文件(测试子目录也不行),如果为空,则不限制目录;

SHOW VARIABLES LIKE "secure_file_priv";




select into outfile '/var/lib/mysql-files/ok.xls' from oktable   order by cat_id desc limit 0,20;


Posted on: 2021/11/8 17:41

Edited by eyex on 2023/8/20 19:09:10
Top








friend links
Themes

(2 themes)
Login
Username:

Password:


Lost Password?
Register now!
Categories
Xoops (11)
--Modules (2)
--Themes (0)
Article (8)