Re: Why is next.jdbc using my IP address?

2022-03-04 Thread Sean Corfield
> Okay, this seems to have to do with characters acting as wildcards in the
password itself. This is in the .env file:

I don't know what library you are using for managing your configuration but
perhaps it interprets $n as an environment variable called n and
substitutes the value (which will be empty, in general).

On Fri, Mar 4, 2022 at 5:58 AM Lawrence Krubner 
wrote:

> Okay, this seems to have to do with characters acting as wildcards in the
> password itself. This is in the .env file:
>
> vvv*8Ezr30R%$n?L5!
>
> but printlin in the Clojure code outputs:
>
> vvv*8Ezr30R%?L5!
>
> The "$n" simply vanishes.
>
> Why is that? This is not a regular expression. I didn't think plain
> strings in Clojure would be interpreted like this.
>
> Or is this how bash interprets it?
>
>
>
>
> On Friday, March 4, 2022 at 8:06:56 AM UTC-5 Lawrence Krubner wrote:
>
>> So, as a new way to test this, I've ssh'ed to an EC2 instance that is in
>> the same VCP as the RDS database. I upload my jar file so I can run it on
>> this EC2 instance.
>>
>> println the hash map at startup:
>>
>> {:dbtype mysql, :dbname pulsedata, :user pulseuser, :password , :host
>> pulse-data.cclr8stksfch.us-west-2.rds.amazonaws.com}
>> This gets me the above error. But if I copy and paste the values and use
>> them with the mysql client:
>>
>> mysql -u pulseuser -h pulse-data.cclr8stksfch.us-west-2.rds.amazonaws.com
>> -p pulsedata
>>
>> I am able to log in. This is in the same terminal window: the MySQL
>> client, at the command line in my terminal, logs me into MySQL, but "java
>> -jar user.jar" in the same terminal window gives me this error, about me
>> being rejected. I am copying and pasting the same values for user and host
>> and password.
>>
>> It has to be something about the Clojure code.
>>
>>
>> On Friday, March 4, 2022 at 6:35:59 AM UTC-5 ore...@orestis.gr wrote:
>>
>>> The error message indicates that you connect with user `pulseuser` - is
>>> that the expected user?
>>>
>>> I would print out the configuration that you’re passing in to jdbc.next
>>> to be absolutely certain it contains the values you expect it does.
>>>
>>> When you say “cli”, do you mean a mysql client? Double check the
>>> credentials (dbname, user, password) that *it* uses.
>>>
>>> Best,
>>> Orestis
>>>
>>> On 4 Mar 2022, at 13.27, Lawrence Krubner  wrote:
>>>
>>> But, again, I can connect from the cli using my terminal. I'm using my
>>> Spectrum connection to the Internet in both cases. If I run the app on my
>>> laptop, or I connect from the terminal, using the CLI, then in all cases
>>> I'm connecting over my Spectrum connection to the Internet. If MySQL was
>>> going to block one, then it would block the other, yes? I think the issue
>>> must have something to do with the Clojure code, since that is the only
>>> difference. I mean, if I do "java -jar user.jar" in the same terminal
>>> window, it fails, but then in that same terminal window I can connect to
>>> RDS without a problem using the CLI.
>>>
>>>
>>> On Thursday, March 3, 2022 at 3:26:31 PM UTC-5 red...@gmail.com wrote:
>>>
 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 
 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
> ' (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.
>
>
>

Re: Why is next.jdbc using my IP address?

2022-03-04 Thread Cora Sutton
And also change your password now.

On Fri, Mar 4, 2022 at 8:09 AM Orestis Markou  wrote:

> You might need to quote the string with single quotes, otherwise bash will
> probably try and interpolate a var `$n`...
>
>
> On 4 Mar 2022, at 15.58, Lawrence Krubner  wrote:
>
> Okay, this seems to have to do with characters acting as wildcards in the
> password itself. This is in the .env file:
>
> vvv*8Ezr30R%$n?L5!
>
> but printlin in the Clojure code outputs:
>
> vvv*8Ezr30R%?L5!
>
> The "$n" simply vanishes.
>
> Why is that? This is not a regular expression. I didn't think plain
> strings in Clojure would be interpreted like this.
>
> Or is this how bash interprets it?
>
>
>
>
> On Friday, March 4, 2022 at 8:06:56 AM UTC-5 Lawrence Krubner wrote:
>
>> So, as a new way to test this, I've ssh'ed to an EC2 instance that is in
>> the same VCP as the RDS database. I upload my jar file so I can run it on
>> this EC2 instance.
>>
>> println the hash map at startup:
>>
>> {:dbtype mysql, :dbname pulsedata, :user pulseuser, :password , :host
>>  pulse-data.cclr8stksfch.us-west-2.rds.amazonaws.com}
>> This gets me the above error. But if I copy and paste the values and use
>> them with the mysql client:
>>
>> mysql -u pulseuser -h pulse-data.cclr8stksfch.us-west-2.rds.amazonaws.com
>>  -p pulsedata
>>
>> I am able to log in. This is in the same terminal window: the MySQL
>> client, at the command line in my terminal, logs me into MySQL, but "java
>> -jar user.jar" in the same terminal window gives me this error, about me
>> being rejected. I am copying and pasting the same values for user and host
>> and password.
>>
>> It has to be something about the Clojure code.
>>
>>
>> On Friday, March 4, 2022 at 6:35:59 AM UTC-5 ore...@orestis.gr wrote:
>>
>>> The error message indicates that you connect with user `pulseuser` - is
>>> that the expected user?
>>>
>>> I would print out the configuration that you’re passing in to jdbc.next
>>> to be absolutely certain it contains the values you expect it does.
>>>
>>> When you say “cli”, do you mean a mysql client? Double check the
>>> credentials (dbname, user, password) that *it* uses.
>>>
>>> Best,
>>> Orestis
>>>
>>> On 4 Mar 2022, at 13.27, Lawrence Krubner  wrote:
>>>
>>> But, again, I can connect from the cli using my terminal. I'm using my
>>> Spectrum connection to the Internet in both cases. If I run the app on my
>>> laptop, or I connect from the terminal, using the CLI, then in all cases
>>> I'm connecting over my Spectrum connection to the Internet. If MySQL was
>>> going to block one, then it would block the other, yes? I think the issue
>>> must have something to do with the Clojure code, since that is the only
>>> difference. I mean, if I do "java -jar user.jar" in the same terminal
>>> window, it fails, but then in that same terminal window I can connect to
>>> RDS without a problem using the CLI.
>>>
>>>
>>> On Thursday, March 3, 2022 at 3:26:31 PM UTC-5 red...@gmail.com wrote:
>>>
 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 
 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
> ' (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

Re: Why is next.jdbc using my IP address?

2022-03-04 Thread Orestis Markou
You might need to quote the string with single quotes, otherwise bash will 
probably try and interpolate a var `$n`...

> On 4 Mar 2022, at 15.58, Lawrence Krubner  wrote:
> 
> Okay, this seems to have to do with characters acting as wildcards in the 
> password itself. This is in the .env file:
> 
> vvv*8Ezr30R%$n?L5!
> 
> but printlin in the Clojure code outputs:
> 
> vvv*8Ezr30R%?L5!
> 
> The "$n" simply vanishes. 
> 
> Why is that? This is not a regular expression. I didn't think plain strings 
> in Clojure would be interpreted like this. 
> 
> Or is this how bash interprets it? 
> 
> 
> 
> 
> On Friday, March 4, 2022 at 8:06:56 AM UTC-5 Lawrence Krubner wrote:
> So, as a new way to test this, I've ssh'ed to an EC2 instance that is in the 
> same VCP as the RDS database. I upload my jar file so I can run it on this 
> EC2 instance.
> 
> println the hash map at startup:
> 
> {:dbtype mysql, :dbname pulsedata, :user pulseuser, :password , :host 
> pulse-data.cclr8stksfch.us-west-2.rds.amazonaws.com 
> }
> 
> This gets me the above error. But if I copy and paste the values and use them 
> with the mysql client:
> 
> mysql -u pulseuser -h pulse-data.cclr8stksfch.us-west-2.rds.amazonaws.com 
>  -p pulsedata
> 
> I am able to log in. This is in the same terminal window: the MySQL client, 
> at the command line in my terminal, logs me into MySQL, but "java -jar 
> user.jar" in the same terminal window gives me this error, about me being 
> rejected. I am copying and pasting the same values for user and host and 
> password. 
> 
> It has to be something about the Clojure code. 
> 
> 
> On Friday, March 4, 2022 at 6:35:59 AM UTC-5 ore...@orestis.gr 
>  wrote:
> The error message indicates that you connect with user `pulseuser` - is that 
> the expected user? 
> 
> I would print out the configuration that you’re passing in to jdbc.next to be 
> absolutely certain it contains the values you expect it does.
> 
> When you say “cli”, do you mean a mysql client? Double check the credentials 
> (dbname, user, password) that *it* uses. 
> 
> Best,
> Orestis
> 
> 
>> On 4 Mar 2022, at 13.27, Lawrence Krubner > wrote:
>> 
> 
>> But, again, I can connect from the cli using my terminal. I'm using my 
>> Spectrum connection to the Internet in both cases. If I run the app on my 
>> laptop, or I connect from the terminal, using the CLI, then in all cases I'm 
>> connecting over my Spectrum connection to the Internet. If MySQL was going 
>> to block one, then it would block the other, yes? I think the issue must 
>> have something to do with the Clojure code, since that is the only 
>> difference. I mean, if I do "java -jar user.jar" in the same terminal 
>> window, it fails, but then in that same terminal window I can connect to RDS 
>> without a problem using the CLI. 
>> 
>> 
>> On Thursday, March 3, 2022 at 3:26:31 PM UTC-5 red...@gmail.com <> wrote:
>> 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 > 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 
>> ' (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 clo...@googlegroups.com <>
>> Note that po

Re: Why is next.jdbc using my IP address?

2022-03-04 Thread Lawrence Krubner
Okay, this seems to have to do with characters acting as wildcards in the 
password itself. This is in the .env file:

vvv*8Ezr30R%$n?L5!

but printlin in the Clojure code outputs:

vvv*8Ezr30R%?L5!

The "$n" simply vanishes. 

Why is that? This is not a regular expression. I didn't think plain strings 
in Clojure would be interpreted like this. 

Or is this how bash interprets it? 




On Friday, March 4, 2022 at 8:06:56 AM UTC-5 Lawrence Krubner wrote:

> So, as a new way to test this, I've ssh'ed to an EC2 instance that is in 
> the same VCP as the RDS database. I upload my jar file so I can run it on 
> this EC2 instance.
>
> println the hash map at startup:
>
> {:dbtype mysql, :dbname pulsedata, :user pulseuser, :password , :host 
> pulse-data.cclr8stksfch.us-west-2.rds.amazonaws.com}
> This gets me the above error. But if I copy and paste the values and use 
> them with the mysql client:
>
> mysql -u pulseuser -h pulse-data.cclr8stksfch.us-west-2.rds.amazonaws.com 
> -p pulsedata
>
> I am able to log in. This is in the same terminal window: the MySQL 
> client, at the command line in my terminal, logs me into MySQL, but "java 
> -jar user.jar" in the same terminal window gives me this error, about me 
> being rejected. I am copying and pasting the same values for user and host 
> and password. 
>
> It has to be something about the Clojure code. 
>
>
> On Friday, March 4, 2022 at 6:35:59 AM UTC-5 ore...@orestis.gr wrote:
>
>> The error message indicates that you connect with user `pulseuser` - is 
>> that the expected user? 
>>
>> I would print out the configuration that you’re passing in to jdbc.next 
>> to be absolutely certain it contains the values you expect it does.
>>
>> When you say “cli”, do you mean a mysql client? Double check the 
>> credentials (dbname, user, password) that *it* uses. 
>>
>> Best,
>> Orestis
>>
>> On 4 Mar 2022, at 13.27, Lawrence Krubner  wrote:
>>
>> But, again, I can connect from the cli using my terminal. I'm using my 
>> Spectrum connection to the Internet in both cases. If I run the app on my 
>> laptop, or I connect from the terminal, using the CLI, then in all cases 
>> I'm connecting over my Spectrum connection to the Internet. If MySQL was 
>> going to block one, then it would block the other, yes? I think the issue 
>> must have something to do with the Clojure code, since that is the only 
>> difference. I mean, if I do "java -jar user.jar" in the same terminal 
>> window, it fails, but then in that same terminal window I can connect to 
>> RDS without a problem using the CLI. 
>>
>>
>> On Thursday, March 3, 2022 at 3:26:31 PM UTC-5 red...@gmail.com wrote:
>>
>>> 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  
>>> 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 
 ' (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 clo...@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+u...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 --

Re: Why is next.jdbc using my IP address?

2022-03-04 Thread Lawrence Krubner


So, as a new way to test this, I've ssh'ed to an EC2 instance that is in 
the same VCP as the RDS database. I upload my jar file so I can run it on 
this EC2 instance.

println the hash map at startup:

{:dbtype mysql, :dbname pulsedata, :user pulseuser, :password , :host 
pulse-data.cclr8stksfch.us-west-2.rds.amazonaws.com}
This gets me the above error. But if I copy and paste the values and use 
them with the mysql client:

mysql -u pulseuser -h pulse-data.cclr8stksfch.us-west-2.rds.amazonaws.com 
-p pulsedata

I am able to log in. This is in the same terminal window: the MySQL client, 
at the command line in my terminal, logs me into MySQL, but "java -jar 
user.jar" in the same terminal window gives me this error, about me being 
rejected. I am copying and pasting the same values for user and host and 
password. 

It has to be something about the Clojure code. 


On Friday, March 4, 2022 at 6:35:59 AM UTC-5 ore...@orestis.gr wrote:

> The error message indicates that you connect with user `pulseuser` - is 
> that the expected user? 
>
> I would print out the configuration that you’re passing in to jdbc.next to 
> be absolutely certain it contains the values you expect it does.
>
> When you say “cli”, do you mean a mysql client? Double check the 
> credentials (dbname, user, password) that *it* uses. 
>
> Best,
> Orestis
>
> On 4 Mar 2022, at 13.27, Lawrence Krubner  wrote:
>
> But, again, I can connect from the cli using my terminal. I'm using my 
> Spectrum connection to the Internet in both cases. If I run the app on my 
> laptop, or I connect from the terminal, using the CLI, then in all cases 
> I'm connecting over my Spectrum connection to the Internet. If MySQL was 
> going to block one, then it would block the other, yes? I think the issue 
> must have something to do with the Clojure code, since that is the only 
> difference. I mean, if I do "java -jar user.jar" in the same terminal 
> window, it fails, but then in that same terminal window I can connect to 
> RDS without a problem using the CLI. 
>
>
> On Thursday, March 3, 2022 at 3:26:31 PM UTC-5 red...@gmail.com wrote:
>
>> 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  
>> 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 
>>> ' (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 clo...@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+u...@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+u...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/clojure/eadd7b66-d19d-41e8-b02d-76185de0778dn%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>>
> -- 
> You received this message because you are subscribed to

Re: Why is next.jdbc using my IP address?

2022-03-04 Thread Orestis Markou
The error message indicates that you connect with user `pulseuser` - is that 
the expected user? 

I would print out the configuration that you’re passing in to jdbc.next to be 
absolutely certain it contains the values you expect it does.

When you say “cli”, do you mean a mysql client? Double check the credentials 
(dbname, user, password) that *it* uses. 

Best,
Orestis

> On 4 Mar 2022, at 13.27, Lawrence Krubner  wrote:
> 
> But, again, I can connect from the cli using my terminal. I'm using my 
> Spectrum connection to the Internet in both cases. If I run the app on my 
> laptop, or I connect from the terminal, using the CLI, then in all cases I'm 
> connecting over my Spectrum connection to the Internet. If MySQL was going to 
> block one, then it would block the other, yes? I think the issue must have 
> something to do with the Clojure code, since that is the only difference. I 
> mean, if I do "java -jar user.jar" in the same terminal window, it fails, but 
> then in that same terminal window I can connect to RDS without a problem 
> using the CLI. 
> 
> 
> On Thursday, March 3, 2022 at 3:26:31 PM UTC-5 redc...@gmail.com wrote:
> 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  > 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 
> ' (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 clo...@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+u...@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+u...@googlegroups.com 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/clojure/eadd7b66-d19d-41e8-b02d-76185de0778dn%40googlegroups.com
>  
> .
> 
> -- 
> 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/9e58a686-29fb-43d4-af41-2cf0345425c6n%40googlegroups.com
>  
> .

-- 
You received this message becaus

Re: Why is next.jdbc using my IP address?

2022-03-04 Thread Lawrence Krubner
But, again, I can connect from the cli using my terminal. I'm using my 
Spectrum connection to the Internet in both cases. If I run the app on my 
laptop, or I connect from the terminal, using the CLI, then in all cases 
I'm connecting over my Spectrum connection to the Internet. If MySQL was 
going to block one, then it would block the other, yes? I think the issue 
must have something to do with the Clojure code, since that is the only 
difference. I mean, if I do "java -jar user.jar" in the same terminal 
window, it fails, but then in that same terminal window I can connect to 
RDS without a problem using the CLI. 


On Thursday, March 3, 2022 at 3:26:31 PM UTC-5 redc...@gmail.com wrote:

> 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  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 
>> ' (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 clo...@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+u...@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+u...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/clojure/eadd7b66-d19d-41e8-b02d-76185de0778dn%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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/9e58a686-29fb-43d4-af41-2cf0345425c6n%40googlegroups.com.


Re: Why is next.jdbc using my IP address?

2022-03-03 Thread Kevin Downey
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  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
> ' (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
> 
> .
>

-- 
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.