duandi8852752 2018-10-25 18:47
浏览 200

Mariadb错误:此MariaDB不允许使用该命令

In mariadb, when I use "load data local infile" into a php script, I get this error message:

the used command is not allowed with this MariaDB version for the query load data local infile

This is the same thing than on this thread.

I'm on CentOS 7 - Plesk Onyx and my my.cnf contains:

local-infile=1

If I use "load data infile", I can import my csv file into my MySQL table but the csv file must to be located into the directory /var/lib/mysql/my_database/

But I can't create a csv file into /var/lib/mysql/my_database/ from a php script located into /var/www/vhosts/my-website.com/httpdocs/my_script.php

if I use "load data infile", I can import my csv file into my MySQL table but the csv file must to be located into the directory /var/lib/mysql/my_database/

But I can't create a csv file into /var/lib/mysql/my_database/ from a php script located into /var/www/vhosts/my-website.com/httpdocs/my_script.php it doesn't work!

What is the solution?

  • 写回答

1条回答 默认 最新

  • dourao1877 2018-10-27 00:40
    关注

    See PHP's open_basedir for restrictions on PHP writing: http://php.net/manual/en/ini.core.php

    评论

报告相同问题?

悬赏问题

  • ¥30 Windows Server 2016利用兩張網卡處理兩個不同網絡
  • ¥15 Python中knn问题
  • ¥15 使用C#,asp.net读取Excel文件并保存到Oracle数据库
  • ¥15 C# datagridview 单元格显示进度及值
  • ¥15 thinkphp6配合social login单点登录问题
  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源