<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Inserting data from csv to a mysql database table in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Inserting-data-from-csv-to-a-mysql-database-table/m-p/102445#M65380</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Hoping someone can help.&lt;/P&gt;&lt;P&gt;I am trying to insert data from a csv file stored on the sandbox (within /root) to a mysql database table. Below I have bullet pointed the steps I have taken and the error I am getting.&lt;/P&gt;&lt;P&gt;- I have a file called countrycodes.csv stored in the /root folder of the sandbox. This contains the data that I want to insert into the database.&lt;/P&gt;&lt;P&gt;- I have created a mysql database called forHadoop. &lt;/P&gt;&lt;P&gt;- I have granted privileges to user hue by: &lt;/P&gt;&lt;P&gt;Grant all privileges on forHadoop.* to hue@localhost identified by '1111'; &lt;/P&gt;&lt;P&gt;- I can log into this database as hue by typing: &lt;/P&gt;&lt;P&gt;mysql -u hue -p &lt;/P&gt;&lt;P&gt;Then type the password 1111 and I am in. &lt;/P&gt;&lt;P&gt;- I have created a table called countrycodes within the database forHadoop. &lt;/P&gt;&lt;P&gt;- I want to populate the table countrycodes with the data from /root/countrycodes.csv.
To do this I type: &lt;/P&gt;&lt;P&gt;mysql forHadoop --local_infile=1 -u hue -p &lt;/P&gt;&lt;P&gt;                                                                                                                                                                   
Then type my password 1111 &lt;/P&gt;&lt;P&gt;- But when I type the below load statement I get an error message. &lt;/P&gt;&lt;P&gt;LOAD DATA LOCAL INFILE ‘/root/countrycodes.csv’ into table forHadoop.countrycodes fields terminated by ‘,’ LINES TERMINATED BY ‘\r\n’; &lt;/P&gt;&lt;P&gt;- The error message is:
ERROR 1044 (42000): Access denied for user 'hue'@'localhost' to database 'nâ€™;' &lt;/P&gt;&lt;P&gt;     
Any idea as to what I am doing wrong? Why is access denied fro user hue?&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 09:57:15 GMT</pubDate>
    <dc:creator>Rebel</dc:creator>
    <dc:date>2022-09-16T09:57:15Z</dc:date>
    <item>
      <title>Inserting data from csv to a mysql database table</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Inserting-data-from-csv-to-a-mysql-database-table/m-p/102445#M65380</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Hoping someone can help.&lt;/P&gt;&lt;P&gt;I am trying to insert data from a csv file stored on the sandbox (within /root) to a mysql database table. Below I have bullet pointed the steps I have taken and the error I am getting.&lt;/P&gt;&lt;P&gt;- I have a file called countrycodes.csv stored in the /root folder of the sandbox. This contains the data that I want to insert into the database.&lt;/P&gt;&lt;P&gt;- I have created a mysql database called forHadoop. &lt;/P&gt;&lt;P&gt;- I have granted privileges to user hue by: &lt;/P&gt;&lt;P&gt;Grant all privileges on forHadoop.* to hue@localhost identified by '1111'; &lt;/P&gt;&lt;P&gt;- I can log into this database as hue by typing: &lt;/P&gt;&lt;P&gt;mysql -u hue -p &lt;/P&gt;&lt;P&gt;Then type the password 1111 and I am in. &lt;/P&gt;&lt;P&gt;- I have created a table called countrycodes within the database forHadoop. &lt;/P&gt;&lt;P&gt;- I want to populate the table countrycodes with the data from /root/countrycodes.csv.
To do this I type: &lt;/P&gt;&lt;P&gt;mysql forHadoop --local_infile=1 -u hue -p &lt;/P&gt;&lt;P&gt;                                                                                                                                                                   
Then type my password 1111 &lt;/P&gt;&lt;P&gt;- But when I type the below load statement I get an error message. &lt;/P&gt;&lt;P&gt;LOAD DATA LOCAL INFILE ‘/root/countrycodes.csv’ into table forHadoop.countrycodes fields terminated by ‘,’ LINES TERMINATED BY ‘\r\n’; &lt;/P&gt;&lt;P&gt;- The error message is:
ERROR 1044 (42000): Access denied for user 'hue'@'localhost' to database 'nâ€™;' &lt;/P&gt;&lt;P&gt;     
Any idea as to what I am doing wrong? Why is access denied fro user hue?&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 09:57:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Inserting-data-from-csv-to-a-mysql-database-table/m-p/102445#M65380</guid>
      <dc:creator>Rebel</dc:creator>
      <dc:date>2022-09-16T09:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting data from csv to a mysql database table</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Inserting-data-from-csv-to-a-mysql-database-table/m-p/102446#M65381</link>
      <description>&lt;P&gt;Your user may not have the privilege&lt;/P&gt;&lt;P&gt;This is what you could do&lt;/P&gt;&lt;P&gt;a) Login as mysql using root&lt;/P&gt;&lt;P&gt;b) change database to forHadoop&lt;/P&gt;&lt;P&gt;c) Run your Load Script. &lt;/P&gt;&lt;P&gt;I have a tutorial for Atlas, where I create 2 mysql tables in a newly created DB instance. Take a look&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/shivajid/atlas/tree/master/tutorial" target="_blank"&gt;https://github.com/shivajid/atlas/tree/master/tutorial&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2016 11:59:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Inserting-data-from-csv-to-a-mysql-database-table/m-p/102446#M65381</guid>
      <dc:creator>sdutta</dc:creator>
      <dc:date>2016-01-14T11:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting data from csv to a mysql database table</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Inserting-data-from-csv-to-a-mysql-database-table/m-p/102447#M65382</link>
      <description>&lt;P&gt;Thanks Shivaji, I managed to get it working...&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2016 01:35:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Inserting-data-from-csv-to-a-mysql-database-table/m-p/102447#M65382</guid>
      <dc:creator>Rebel</dc:creator>
      <dc:date>2016-01-21T01:35:24Z</dc:date>
    </item>
  </channel>
</rss>

