title: MySQL LOAD XML returns "access denied"
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1014724/mysql-permission-errors-with-load-data">Mysql permission errors with ‘load data’</a>  </p>
  </blockquote>
  
  
  
  <p>I am needing a PHP script that loads a large XML file into MySQL. I will be using this in a cron.</p>
  
  <p>I first tried to use the DOM and XMLReader PHP libraries to parse the XML into rows that I could insert into MySQL. This file was large enough that I ran out of memory trying to deal with it. I am already at 128MB of memory in PHP.</p>
  
  <p>I am trying out the LOAD XML INFILE command in MySQL. This part of MySQL is completely new to me. I had to upgrade to a newer version of MySQL so that LOAD XML is supported. I tried executing this:</p>
  
  <pre><code>LOAD XML INFILE '/path/huge_xml_file.xml'
  INTO TABLE `my_table`
  ROWS IDENTIFIED BY '&lt;ROW&gt;' ;
  </code></pre>
  
  <p>MySQL returned:</p>
  
  <pre><code>Error Code: 1045. Access denied for user 'db_user'@'###.###.###.###' (using password: YES)
  </code></pre>
  
  <p>After some reading, my understanding is that loading files from MySQL is disabled by default. I've had some trouble locating a detailed description of what I need to change on the server and where in order to get this approach to work for me.</p>