谁知道如何在Ubuntu上的最新
MySQL中打开加载本地infile设置?我编辑了/etc/MysqL/my.cnf文件并添加了
local-infile=1
并在Perl代码中
dbConnectString=dbi:MysqL:orthomcl:MysqLlocalinfile=1
但仍然得到
DBD::MysqL::st execute Failed: The used command is not allowed with this MysqL version...
它由名为OrthoMCL的应用程序使用
我尝试配置my.cnf文件:
sudo vim /etc/MysqL/my.cnf [MysqLd] user = MysqL pid-file = /var/run/MysqLd/MysqLd.pid socket = /var/run/MysqLd/MysqLd.sock port = 3306 basedir = /usr datadir = /var/lib/MysqL tmpdir = /tmp lc-messages-dir = /usr/share/MysqL skip-external-locking local-infile = 1 [MysqL] #no-auto-rehash # faster start of MysqL but no tab completition local-infile = 1
然后重启MysqL服务器:
sudo service MysqL restart MysqL stop/waiting MysqL start/running,process 9563
但后来我仍然得到:
DBD::MysqL::st execute Failed: The used command is not allowed with this MysqL version at ../Apps/orthomclSoftware-v2.0.3/bin/orthomclLoadBlast line 39,<F> line 12. The used command is not allowed with this MysqL version at ../Apps/orthomclSoftware-v2.0.3/bin/orthomclLoadBlast line 39,<F> line 12.`
第39行是:
$stmt->execute() or die DBI::errstr;
执行上面的行:
my $sql = " LOAD DATA LOCAL INFILE \"$blastFile\" REPLACE INTO TABLE $sst FIELDS TERMINATED BY '\\t' "; my $stmt = $dbh->prepare($sql) or die DBI::errstr;