Results 1 to 7 of 7
  1. #1
    Full Member
    Join Date
    January 18th, 2005
    Posts
    88
    This is not for PHPMyAdmin. I want to load some data into SQL using
    my PHP script.

    LOAD DATA LOCAL won't work in the current versions of MySQL.
    It is patched due to some security issues.

    MySQL manual says that we have to use LOAD DATA instead.
    When I try LOAD DATA command, I get an Access Denied error.

    "Access denied for user: 'my_dbusr@localhost' (Using password: YES)"

    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>
    If you are able to connect to the MySQL server, but get an Access denied message whenever you issue a SELECT ... INTO OUTFILE or LOAD DATA INFILE statement, your entry in the user table doesn't have the FILE privilege enabled.
    <HR></BLOCKQUOTE>

    Unfortunately, CPanel is not having FILE privilege option while creating the usernames and granting privileges for the mysql databases.

    Help is appreciated.

  2. #2
    Full Member
    Join Date
    January 18th, 2005
    Posts
    379
    I think I had a similar problem. I had to FTP the data up to the web server and use a PHP script to load the data into mysql. I've had pretty good luck with a script called "php csv importer" by Matthew Lindley.

  3. #3
    Newbie
    Join Date
    January 18th, 2005
    Location
    Mount Pleasant, WI
    Posts
    41
    A large majority of hosts disable the "LOAD DATA" command due to security reasons (that I can't fully explain...) It is most likely not a problem with your script or your host.

    One way around this is in a post I made a while back:
    http://abw.infopop.cc/eve/ubb.x?a=tp...1&m=5656043655

    Hope that helps!
    ScottyB

  4. #4
    ABW Ambassador
    Join Date
    January 18th, 2005
    Posts
    4,423
    If you have mysql access from command line, you can use this:

    mysql --local-infile=1 -u yourusername -p

    and then load it.

  5. #5
    ABW Ambassador
    Join Date
    January 18th, 2005
    Location
    ÄúsTrálíĺ
    Posts
    1,372

  6. #6
    Full Member
    Join Date
    January 18th, 2005
    Posts
    88
    Thanks for your replies.

    for-loop is a good option. But I want something fast. Since the datafeed records are in thousands, there is a chance that, due to connection timeouts, the script may hang in the dark. I would resort to this method when everything else fails.

    I think to use mysqlimport we need telnet access. Unfortunately, we do not have telnet access.

    The script i am running is a cron job. It is an unattended database refresh.

    http://dev.mysql.com/doc/mysql/en/mysqlimport.html
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>
    to use mysqlimport command with
    appropriate options, please check that the 'FILE' privilege is granted to you.
    <HR></BLOCKQUOTE>

    Only thing to do is to ask the host to GRANT FILE privilege. I have opened a ticket.
    Let's see what happens.

  7. #7
    Full Member
    Join Date
    January 18th, 2005
    Posts
    88
    My host tells me that " If Cpanel does not offer FILE privilege, we cannot do it for you".

    And CSVimporter won't work with Firefox browser.
    And Again I am getting the same
    Access denied error with CSV importer too.

    I don't know when this will end.

  8. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. MySQL LOAD DATA INFILE question
    By PatrickAllmond in forum Programming / Datafeeds / Tools
    Replies: 12
    Last Post: March 4th, 2006, 01:47 PM
  2. Access Denied
    By Snib in forum Rakuten LinkShare - LS
    Replies: 7
    Last Post: November 3rd, 2005, 08:22 PM
  3. "Access denied for user" Please help
    By netsu in forum Programming / Datafeeds / Tools
    Replies: 4
    Last Post: January 16th, 2004, 10:05 PM
  4. Try to load a datafile into MySQL....
    By TJ in forum Programming / Datafeeds / Tools
    Replies: 26
    Last Post: February 7th, 2003, 06:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •