Jump to content

Mysql data import has error


irabelle1994

Recommended Posts

I am having error while using load data local infile on button.. 
--here's the code in php

 
sc_exec_sql("load data local infile '/PATH/IMPORT/FILE' into table TABLETOIMPORT fields terminated by '\t' lines terminated by '\n'") 

this script returns: 

   Error while accessing the database: 
   The used command is not allowed with this MySQL version 

but it works fine when i execute this same script on mysql on server command line (Ubuntu server) 

load data local infile '/PATH/IMPORT/FILE' into table TABLETOIMPORT fields terminated by '\t' lines terminated by '\n' 

How to solve this problem?? 

Below are the details of my development environment 
Ubuntu Server 13.04 
PHP 5.49 
MySQL 14.14 
Rapid Development Tool - Scriptcase 7.1 


Thanks!

Link to comment
Share on other sites

First off, you posted this in the wrong section. You posted in the Microsoft SQL Server forums, which is an entirely different product from Mysql which is what you are actually using. I've moved your post for you.

 

Secondly, review this bit of the manual: 6.1.6. Security Issues with LOAD DATA LOCAL. That will provide you with info about how to determine why it is disabled. It may be that there is nothing easy you can to do enable it. In that case you'd have to develop your own import utility which will parse the file and generate insert statements.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.