Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8837661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:47:04+00:00 2026-06-14T09:47:04+00:00

I am using LAMP in Ubuntu 12.04. I created a new user in MySQL

  • 0

I am using LAMP in Ubuntu 12.04. I created a new user in MySQL (myserver@localhost) and granted ALL on a database to that user. There is a text file the permission of which is set to read for everyone. But when I try to load the data from that text file to the database, it says “Access denied for user ‘myserver’@’localhost’ (using password: YES)”

The query I used is:

LOAD DATA INFILE "~/text/member_info.txt" INTO TABLE member FIELDS TERMINATED BY '|';

I can think of a workaround with some loops in PHP but why doesn’t the ‘LOAD DATA INFILE’ work?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T09:47:06+00:00Added an answer on June 14, 2026 at 9:47 am

    This is due the MYSQL 5.5 version you are using in Ubuntu LTS 12.04 : mysql doc

    From mysql doc comment :

    You can use LOAD DATA LOCAL with recent versions of PHP without
    recompiling PHP.

    Passing 128 (the value of the CLIENT_LOCAL_FILES constant) as the
    fifth parameter to mysql_connect () enables LOAD DATA LOCAL on the
    client side.

    Example: $dbh = mysql_connect($server, $user, $pass, false, 128);

    For PHP 4.3 and above.

    But in fact, mysql_connect() is obsolete, and I can’t find a solution using mysqli.

    That’s why I finally use this who solve the problem.

    grant file on *.* to mydatabase@localhost identified by 'myuser';
    

    Now $mysqli->query(“LOAD DATA INFILE ‘”.$proxy_file_name_path.”‘ IGNORE INTO TABLE mytable (myfield)”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using MySQLi with PHP(5.2.4) MySQL(5.0.51a) on Ubuntu 8.04 LAMP. The relevant Db tables
I am using ubuntu 11.04 with an apache-mysql server (I think that is called
So I'm using this website: http://www.howtoforge.com/ubuntu_debian_lamp_server to setup LAMP on my Ubuntu Virtual Machine.
I just set up a new LAMP server. I can connect to mysql through
I'm used to web development using LAMP, PHP5, MySQL plus NetBeans with Xdebug. Now
[Updated below] I am having a problem connecting to a MySQL database using a
UPDATE 1: I am using Ubuntu 10.04 and installed the default LAMP stack. ORIGINAL
I have an Ubuntu Server (with all of LAMP and Subversion installed). I use
I'm using ubuntu 10.10, and after making the mistake of installing LAMP, (was unable
Using PHPMyAdmin in a Ubuntu desktop test server box that I have just installed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.