The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

LOAD DATA question....

Discussion in 'General Discussion' started by Tom Pyles, Nov 4, 2002.

  1. Tom Pyles

    Tom Pyles Well-Known Member

    Joined:
    Apr 26, 2002
    Messages:
    254
    Likes Received:
    0
    Trophy Points:
    16
    A user sent me a question that is a little out of my expertise (first time it has been asked ;) )

    'CPANEL will not work with LOAD DATA Queries and that CPANEL turns The ability to do a LOAD DATA off every time an update occurs.

    Is this correct, and if so how do you by pass this problem.'

    Anyone have an idea what this is all about?
     
  2. Annette

    Annette Well-Known Member
    PartnerNOC

    Joined:
    Aug 12, 2001
    Messages:
    445
    Likes Received:
    0
    Trophy Points:
    16
    Greetings again. LOAD INFILE will not work unless users are specifically granted file permission within the database. By default, this option is not enabled. You can do it, though - if you're comfortable moving around in the command line mySQL, that's fastest, but some people don't like that. For them, the option is to install a copy of phpMyAdmin on the box where that user's account is, and set the config with the username: root, password: (root's pass), only_db: mysql and then go to phpMyAdmin via browser. In the table 'user', find the database user and enable the 'File_priv' option for that user. Restart mySQL, and they should be good to go. Then get rid of the config file or remove the password and database from it so no one stumbles onto it accidentally.
     
  3. Tom Pyles

    Tom Pyles Well-Known Member

    Joined:
    Apr 26, 2002
    Messages:
    254
    Likes Received:
    0
    Trophy Points:
    16
    Annette,
    Thanks once again. I will look into that. One thing that concerns me is this guys current host uses CPanel also...everytime that host does a CPanel update, this client loses whatever access he had. I'm not sure what the host is doing for the temporary fixes. PLaying with the configs in MySQL is where my skills fall short. I will research your reply a little and see where I can take it...Would you know of a good resource that is specific to this topic?? Thanks again!!!!
     
  4. Annette

    Annette Well-Known Member
    PartnerNOC

    Joined:
    Aug 12, 2001
    Messages:
    445
    Likes Received:
    0
    Trophy Points:
    16
    It's hard to say what temporary things he might be doing. We've had to grant file permissions for only a handful of accounts out of all the thousands that we host (since most people wouldn't even know what it was if you tried to explain it to them). All of the changes we've made granting this use have stayed throughout many cPanel updates. If for some reason he's granting the permission to a created db user and that user is being deleted and recreated all the time, that would certainly account for it. Off the top of my head, I'm not aware of any other circumstance that would.

    We've walked several hosts through both methods of setting this. It only takes a minute or two to change it and restart mySQL, even for those who loaded up a copy of phpMyAdmin to access the master db.
     
  5. Tom Pyles

    Tom Pyles Well-Known Member

    Joined:
    Apr 26, 2002
    Messages:
    254
    Likes Received:
    0
    Trophy Points:
    16
    Thanks again Annette...I may end up contacting you. One thing I found strange is this client was referred by a current client. That client is already using this method...hmmm ;)
     
  6. Annette

    Annette Well-Known Member
    PartnerNOC

    Joined:
    Aug 12, 2001
    Messages:
    445
    Likes Received:
    0
    Trophy Points:
    16
    Things also depend on what vesions/compiles are in use, of course. Previous versions of mySQL did not restrict file_priv (it was enabled by default for any created db user). One of the intervening upgrades took that away, since it does present a minor security problem for people who aren't careful.
     
  7. bonnmac

    bonnmac Well-Known Member

    Joined:
    Apr 26, 2003
    Messages:
    101
    Likes Received:
    0
    Trophy Points:
    16
    Hi Annette sorry to bother you, but I saw this post of yours and was wondering if you could help me out.

    I have a client looking for this and I am not that mysql savvy. My tech is away on vacation. :( Could you possibly give me instructions on how to do this from command line?

    Thanks,
    Bonnie

    cPanel.net Support Ticket Number:
     
  8. butch

    butch Active Member

    Joined:
    Jun 23, 2003
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Hi annette,

    Can you provide the steps needed to enable file permission via CLI?

    THank you.
     
  9. butch

    butch Active Member

    Joined:
    Jun 23, 2003
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Does anyone else know how to grant FILE permission to a user via command line?
     
  10. furquan

    furquan Well-Known Member

    Joined:
    Jul 27, 2002
    Messages:
    425
    Likes Received:
    0
    Trophy Points:
    16
    I would like to know too :)
     
  11. tedly

    tedly Registered
    PartnerNOC

    Joined:
    Nov 18, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    go into mysql as root then run these commands

    use mysql

    update user set File_priv="Y" where User = "your_user";

    verify it with:

    select File_priv from user where User = "your_user";
     
Loading...

Share This Page