phpstudy中Mysql命令行对文件的读取

首先,在命令行查看secure_file_priv为null,这是万万不行滴

phpstudy中Mysql命令行对文件的读取

打开Phpstudy,选择“其他菜单选项”-“打开配置文件”-“mysql-ini”

phpstudy中Mysql命令行对文件的读取

添加secure_file_priv=,后面不要写东西

phpstudy中Mysql命令行对文件的读取

重启数据库,重启数据库,重启数据库!!!

phpstudy中Mysql命令行对文件的读取

再次查询已经为空

phpstudy中Mysql命令行对文件的读取

现在来试试读取文件内容

在某盘创建文件写入内容

phpstudy中Mysql命令行对文件的读取

查询,完全Ok

phpstudy中Mysql命令行对文件的读取