<?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 Re: Which user permissions needed for NiFi to access mysql cdc in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Which-user-permissions-needed-for-NiFi-to-access-mysql-cdc/m-p/349696#M235740</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/71250"&gt;@SandyClouds&lt;/a&gt;,&amp;nbsp;Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future.&lt;/P&gt;</description>
    <pubDate>Mon, 08 Aug 2022 09:04:51 GMT</pubDate>
    <dc:creator>VidyaSargur</dc:creator>
    <dc:date>2022-08-08T09:04:51Z</dc:date>
    <item>
      <title>Which user permissions needed for NiFi to access mysql cdc</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Which-user-permissions-needed-for-NiFi-to-access-mysql-cdc/m-p/349059#M235516</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello All,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am using the mysql CDC processor in Nifi, to get incremental changes into DWH, in this processor fo the username field, which permissions should be granted to the user so that it can access cdc files ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;should be the one with highest privileges/ root user&amp;nbsp;?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;because it is not mentioned anywhere in the help section (&lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-cdc-mysql-nar/1.5.0/org.apache.nifi.cdc.mysql.processors.CaptureChangeMySQL/" target="_self" rel="nofollow noopener noreferrer"&gt;https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-cdc-mysql-nar/1.5.0/org.apach...&lt;/A&gt;&amp;nbsp;&lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-cdc-mysql-nar/1.5.0/org.apache.nifi.cdc.mysql.processors.CaptureChangeMySQL/)" target="_blank" rel="noopener nofollow noreferrer"&gt;)&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And when i provide a user credentials who has&amp;nbsp;GRANT ALL PRIVILEGES ON *.*&amp;nbsp; then it is able to access CDC bin logs&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But getting permission denied when trying to access with a user who has only read permissions on *.*&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Since the processor has nothing to do with write, i thought only read permissions were enough, but looks like its not the case..&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Because I need to create new users in the source to access these CDC files.. and I dont want to give them Grant ALL, as it seems riskier.. Please help with your suggestions and thoughts..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2022 07:51:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Which-user-permissions-needed-for-NiFi-to-access-mysql-cdc/m-p/349059#M235516</guid>
      <dc:creator>SandyClouds</dc:creator>
      <dc:date>2022-07-29T07:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: Which user permissions needed for NiFi to access mysql cdc</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Which-user-permissions-needed-for-NiFi-to-access-mysql-cdc/m-p/349210#M235559</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/71250"&gt;@SandyClouds&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The&amp;nbsp;CaptureChangeMySQL processor acts as a MySQL replication slave. As such, I believe it requires the &lt;A href="https://dev.mysql.com/doc/refman/8.0/en/replication-howto-repuser.html" target="_self"&gt;REPLICATION_SLAVE&lt;/A&gt; privilege in MySQL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;André&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 01:05:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Which-user-permissions-needed-for-NiFi-to-access-mysql-cdc/m-p/349210#M235559</guid>
      <dc:creator>araujo</dc:creator>
      <dc:date>2022-08-01T01:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: Which user permissions needed for NiFi to access mysql cdc</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Which-user-permissions-needed-for-NiFi-to-access-mysql-cdc/m-p/349339#M235623</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/11191"&gt;@araujo&lt;/a&gt;&amp;nbsp;, Thank you very much for the answer and info..&lt;/P&gt;&lt;P&gt;I am running a single master server and i don't have/need any replication server for my usecase.&lt;/P&gt;&lt;P&gt;But I just created a user based on your suggestion like below:&lt;/P&gt;&lt;P&gt;mysql&amp;gt; create user 'replication'@'localhost' IDENTIFIED BY 'PASSWORD';&lt;BR /&gt;Query OK, 0 rows affected (0.03 sec)&lt;/P&gt;&lt;P&gt;mysql&amp;gt; create user 'replication'@'%' IDENTIFIED BY 'PASSWORD';&lt;BR /&gt;Query OK, 0 rows affected (0.00 sec)&lt;/P&gt;&lt;P&gt;mysql&amp;gt; GRANT REPLICATION SLAVE on *.* TO 'replication'@'%';&lt;BR /&gt;Query OK, 0 rows affected (0.00 sec)&lt;/P&gt;&lt;P&gt;mysql&amp;gt; GRANT REPLICATION SLAVE on *.* TO 'replication'@'localhost';&lt;BR /&gt;Query OK, 0 rows affected (0.01 sec)&lt;/P&gt;&lt;P&gt;mysql&amp;gt; FLUSH PRIVILEGES;&lt;BR /&gt;Query OK, 0 rows affected (0.00 sec)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I tried to connect to the db using a mysql client- it says permission denied for user &lt;A href="mailto:replication@localhost" target="_blank"&gt;replication@localhost&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And also tried to use the same user in Nifi processor (capture change Mysql)&lt;/P&gt;&lt;P&gt;and it also errored out as expected - "could not connect binlog client to any of specified hosts"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please help me where I am doing it wrong..&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 10:16:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Which-user-permissions-needed-for-NiFi-to-access-mysql-cdc/m-p/349339#M235623</guid>
      <dc:creator>SandyClouds</dc:creator>
      <dc:date>2022-08-02T10:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: Which user permissions needed for NiFi to access mysql cdc</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Which-user-permissions-needed-for-NiFi-to-access-mysql-cdc/m-p/349396#M235640</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/71250"&gt;@SandyClouds&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You don't need a MySQL replication server. What I meant is that the&amp;nbsp;&lt;SPAN&gt;CaptureChangeMySQL &lt;STRONG&gt;act as&lt;/STRONG&gt; a replication client, and needs the same privileges as one.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tested the exact same commands that you specified above and I was able to connect to the database from the command line:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[root@cdp ~]# mysql -u replication -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 8.0.26 Source distribution

Copyright (c) 2000, 2021, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql&amp;gt; &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was also able to configure the CaptureChangeMySQL processor to capture changes without any other privileges being granted:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="araujo_0-1659502129903.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/35091iD53FF71551167BB2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="araujo_0-1659502129903.png" alt="araujo_0-1659502129903.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which version of MySQL are you using?&lt;/P&gt;&lt;P&gt;There seems to be some issue with your user creation. The connection from the command line should work. What was the command you used to connect to the db using the replication user?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please provide the configuration of your processor?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;André&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 04:50:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Which-user-permissions-needed-for-NiFi-to-access-mysql-cdc/m-p/349396#M235640</guid>
      <dc:creator>araujo</dc:creator>
      <dc:date>2022-08-03T04:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: Which user permissions needed for NiFi to access mysql cdc</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Which-user-permissions-needed-for-NiFi-to-access-mysql-cdc/m-p/349696#M235740</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/71250"&gt;@SandyClouds&lt;/a&gt;,&amp;nbsp;Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2022 09:04:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Which-user-permissions-needed-for-NiFi-to-access-mysql-cdc/m-p/349696#M235740</guid>
      <dc:creator>VidyaSargur</dc:creator>
      <dc:date>2022-08-08T09:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: Which user permissions needed for NiFi to access mysql cdc</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Which-user-permissions-needed-for-NiFi-to-access-mysql-cdc/m-p/349702#M235744</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/11191"&gt;@araujo&lt;/a&gt;&amp;nbsp;, Much thankful to your answer..&lt;/P&gt;&lt;P&gt;Yes it worked for me after fixing user.&lt;/P&gt;&lt;P&gt;I had to enable native password for the user..&lt;/P&gt;&lt;P&gt;so, I ran this command "ALTER USER 'replication'@'localhost' IDENTIFIED WITH mysql_native_password BY 'somepassword' " to fix user&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(One other observation while connecting through SQL client is, if I just leave the database name empty then it connects with replication user, if any db name is provided, it will throws error.)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2022 10:00:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Which-user-permissions-needed-for-NiFi-to-access-mysql-cdc/m-p/349702#M235744</guid>
      <dc:creator>SandyClouds</dc:creator>
      <dc:date>2022-08-08T10:00:36Z</dc:date>
    </item>
  </channel>
</rss>

