That is a message from MySQL, not next.jdbc. MySQL allows you to grant permissions to a user base on the host they are connecting from so permission denied kinds of errors include the username and the host the users connection came from.
On Thu, Mar 3, 2022, 11:18 Lawrence Krubner <lawre...@virtalabs.com> wrote: > I just wrote a small app that needs to connect to a MySQL app. I was > running it on my laptop, connecting to MySQL on the laptop, and everything > was working fine. Then I wanted to connect to one of our test databases in > RDS in AWS. I've a simple function that finds the environment variables and > returns them as a map: > > (defn get-config > [] > (check-config) > { > :dbtype "mysql" > :dbname (System/getenv "DATABASE_NAME") > :user (System/getenv "DATABASE_USER") > :password (System/getenv "DATABASE_PASSWORD") > :host (System/getenv "DATABASE_HOST") > }) > > This is used simply: > ds (jdbc/get-datasource (get-config)) > > I've checked the environment values several times and they are correct. > But when the code tries to write to the RDS database, I get: > > *java.sql.SQLException*: *Access denied for user > 'pulseuser'@'cpe-74-71-234-49.nyc.res.rr.com > <http://cpe-74-71-234-49.nyc.res.rr.com>' (using password: YES)* > > I am connecting to the Internet through Spectrum, and apparently "rr.com" > is Spectrum. I'm confused, why would next.jdbc use this info? Did I forget > some important value in the hash map? > > From my laptop, I can reach the RDS database using the MySQL CLI, so there > are no problems with connectivity. I whitelisted the IP address of my > house. This is something specific about what next.jdbc needs in that hash > map, I think. > > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/clojure/eadd7b66-d19d-41e8-b02d-76185de0778dn%40googlegroups.com > <https://groups.google.com/d/msgid/clojure/eadd7b66-d19d-41e8-b02d-76185de0778dn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/clojure/CAE8CPr6D_g1iNX0H%2BtM8MUAaFV6trFKE9f7e4VxOMu5tb0Damg%40mail.gmail.com.