dbTalk Databases Forums  

Error 1045 when connecting via Query Browser

comp.databases.mysql comp.databases.mysql


Discuss Error 1045 when connecting via Query Browser in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ran Shenhar
 
Posts: n/a

Default Error 1045 when connecting via Query Browser - 11-23-2009 , 02:04 PM






Hi,
MySQL NB here.
Got a MySQL on linux.
When connecting from the local machine (mysql -u<user> -p<password>) I
can log in.
When trying from my Win machine to connect using Query Browser, I get
error 1045 "Access denied for user '<user>'@'Windows Machine
IP' (using password: YES).
I tried various combinations of " grant ALL on <DB> to <user>@<IP>;",
but nothing helped so far.

Any hints (except for the obvious "don't use query browser")?

Thanks,

Reply With Quote
  #2  
Old   
Robert Hairgrove
 
Posts: n/a

Default Re: Error 1045 when connecting via Query Browser - 11-23-2009 , 02:22 PM






Ran Shenhar wrote:
Quote:
Hi,
MySQL NB here.
Got a MySQL on linux.
When connecting from the local machine (mysql -u<user> -p<password>) I
can log in.
When trying from my Win machine to connect using Query Browser, I get
error 1045 "Access denied for user '<user>'@'Windows Machine
IP' (using password: YES).
I tried various combinations of " grant ALL on <DB> to <user>@<IP>;",
but nothing helped so far.

Any hints (except for the obvious "don't use query browser")?

Thanks,
In MySQL, users are never identified solely by the user name, but by the
combination of user + host (i.e., the machine or network address from
which the user is coming). It is good for security reasons to have it
this way.

You need to have either a user/host combination of `user`@`*` or else a
user `user`@`<your Windows machine's IP address>` in addition to
`user`@`localhost`. Grant the appropriate permissions to the
combination(s) you need.

Reply With Quote
  #3  
Old   
Ran Shenhar
 
Posts: n/a

Default Re: Error 1045 when connecting via Query Browser - 11-23-2009 , 02:33 PM



On Nov 23, 12:22*pm, Robert Hairgrove <rhairgr... (AT) bigfoot (DOT) com> wrote:
Quote:
Ran Shenhar wrote:
Hi,
MySQL NB here.
Got a MySQL on linux.
When connecting from the local machine (mysql -u<user> -p<password>) I
can log in.
When trying from my Win machine to connect using Query Browser, I get
error 1045 "Access denied for user '<user>'@'Windows Machine
IP' (using password: YES).
I tried various combinations of " grant ALL on <DB> to <user>@<IP>;",
but nothing helped so far.

Any hints (except for the obvious "don't use query browser")?

Thanks,

In MySQL, users are never identified solely by the user name, but by the
combination of user + host (i.e., the machine or network address from
which the user is coming). It is good for security reasons to have it
this way.

You need to have either a user/host combination of `user`@`*` or else a
user `user`@`<your Windows machine's IP address>` in addition to
`user`@`localhost`. *Grant the appropriate permissions to the
combination(s) you need.
Thanks - but no luck with the grant: mysql> grant ALL on *.* to
'root'@'10.1.2.15';
Query OK, 0 rows affected (0.00 sec)

Reply With Quote
  #4  
Old   
Jerry Stuckle
 
Posts: n/a

Default Re: Error 1045 when connecting via Query Browser - 11-23-2009 , 03:00 PM



Ran Shenhar wrote:
Quote:
On Nov 23, 12:22 pm, Robert Hairgrove <rhairgr... (AT) bigfoot (DOT) com> wrote:
Ran Shenhar wrote:
Hi,
MySQL NB here.
Got a MySQL on linux.
When connecting from the local machine (mysql -u<user> -p<password>) I
can log in.
When trying from my Win machine to connect using Query Browser, I get
error 1045 "Access denied for user '<user>'@'Windows Machine
IP' (using password: YES).
I tried various combinations of " grant ALL on <DB> to <user>@<IP>;",
but nothing helped so far.
Any hints (except for the obvious "don't use query browser")?
Thanks,
In MySQL, users are never identified solely by the user name, but by the
combination of user + host (i.e., the machine or network address from
which the user is coming). It is good for security reasons to have it
this way.

You need to have either a user/host combination of `user`@`*` or else a
user `user`@`<your Windows machine's IP address>` in addition to
`user`@`localhost`. Grant the appropriate permissions to the
combination(s) you need.

Thanks - but no luck with the grant: mysql> grant ALL on *.* to
'root'@'10.1.2.15';
Query OK, 0 rows affected (0.00 sec)
Are these on the same intranet? Did you set up a password for
root (AT) 10 (DOT) 1.2.15? It is a different user than root (AT) localhost (DOT)

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex (AT) attglobal (DOT) net
==================

Reply With Quote
  #5  
Old   
Ran Shenhar
 
Posts: n/a

Default Re: Error 1045 when connecting via Query Browser - 11-23-2009 , 03:10 PM



On Nov 23, 1:00*pm, Jerry Stuckle <jstuck... (AT) attglobal (DOT) net> wrote:
Quote:
Ran Shenhar wrote:
On Nov 23, 12:22 pm, Robert Hairgrove <rhairgr... (AT) bigfoot (DOT) com> wrote:
Ran Shenhar wrote:
Hi,
MySQL NB here.
Got a MySQL on linux.
When connecting from the local machine (mysql -u<user> -p<password>) I
can log in.
When trying from my Win machine to connect using Query Browser, I get
error 1045 "Access denied for user '<user>'@'Windows Machine
IP' (using password: YES).
I tried various combinations of " grant ALL on <DB> to <user>@<IP>;",
but nothing helped so far.
Any hints (except for the obvious "don't use query browser")?
Thanks,
In MySQL, users are never identified solely by the user name, but by the
combination of user + host (i.e., the machine or network address from
which the user is coming). It is good for security reasons to have it
this way.

You need to have either a user/host combination of `user`@`*` or else a
user `user`@`<your Windows machine's IP address>` in addition to
`user`@`localhost`. *Grant the appropriate permissions to the
combination(s) you need.

Thanks - but no luck with the grant: mysql> grant ALL on *.* to
'root'@'10.1.2.15';
Query OK, 0 rows affected (0.00 sec)

Are these on the same intranet? *Did you set up a password for
r... (AT) 10 (DOT) 1.2.15? *It is a different user than root (AT) localhost (DOT)

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck... (AT) attglobal (DOT) net
==================
Yes, machines are on same intranet and are accessible (ping works, I
can see the connection request running tcpdump on the mysql machine).
No I haven't as I wasn't aware I needed to - how do I go about that?
Also, since my Win is DHCP based, how do I make it general and not IP
specific?

Thanks,

Reply With Quote
  #6  
Old   
Ran Shenhar
 
Posts: n/a

Default Re: Error 1045 when connecting via Query Browser - 11-23-2009 , 03:18 PM



On Nov 23, 1:10*pm, Ran Shenhar <ran.shen... (AT) gmail (DOT) com> wrote:
Quote:
On Nov 23, 1:00*pm, Jerry Stuckle <jstuck... (AT) attglobal (DOT) net> wrote:



Ran Shenhar wrote:
On Nov 23, 12:22 pm, Robert Hairgrove <rhairgr... (AT) bigfoot (DOT) com> wrote:
Ran Shenhar wrote:
Hi,
MySQL NB here.
Got a MySQL on linux.
When connecting from the local machine (mysql -u<user> -p<password>) I
can log in.
When trying from my Win machine to connect using Query Browser, I get
error 1045 "Access denied for user '<user>'@'Windows Machine
IP' (using password: YES).
I tried various combinations of " grant ALL on <DB> to <user>@<IP>;",
but nothing helped so far.
Any hints (except for the obvious "don't use query browser")?
Thanks,
In MySQL, users are never identified solely by the user name, but bythe
combination of user + host (i.e., the machine or network address from
which the user is coming). It is good for security reasons to have it
this way.

You need to have either a user/host combination of `user`@`*` or else a
user `user`@`<your Windows machine's IP address>` in addition to
`user`@`localhost`. *Grant the appropriate permissions to the
combination(s) you need.

Thanks - but no luck with the grant: mysql> grant ALL on *.* to
'root'@'10.1.2.15';
Query OK, 0 rows affected (0.00 sec)

Are these on the same intranet? *Did you set up a password for
r... (AT) 10 (DOT) 1.2.15? *It is a different user than root (AT) localhost (DOT)

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck... (AT) attglobal (DOT) net
==================

Yes, machines are on same intranet and are accessible (ping works, I
can see the connection request running tcpdump on the mysql machine).
No I haven't as I wasn't aware I needed to - how do I go about that?
Also, since my Win is DHCP based, how do I make it general and not IP
specific?

Thanks,
Following your comment, I saw on mysql.user that my user has no
password, I removed the password from Query Browser - it works.

Thanks for the pointer!

Reply With Quote
  #7  
Old   
Jerry Stuckle
 
Posts: n/a

Default Re: Error 1045 when connecting via Query Browser - 11-23-2009 , 03:54 PM



Ran Shenhar wrote:
Quote:
On Nov 23, 1:10 pm, Ran Shenhar <ran.shen... (AT) gmail (DOT) com> wrote:
On Nov 23, 1:00 pm, Jerry Stuckle <jstuck... (AT) attglobal (DOT) net> wrote:



Ran Shenhar wrote:
On Nov 23, 12:22 pm, Robert Hairgrove <rhairgr... (AT) bigfoot (DOT) com> wrote:
Ran Shenhar wrote:
Hi,
MySQL NB here.
Got a MySQL on linux.
When connecting from the local machine (mysql -u<user> -p<password>) I
can log in.
When trying from my Win machine to connect using Query Browser, I get
error 1045 "Access denied for user '<user>'@'Windows Machine
IP' (using password: YES).
I tried various combinations of " grant ALL on <DB> to <user>@<IP>;",
but nothing helped so far.
Any hints (except for the obvious "don't use query browser")?
Thanks,
In MySQL, users are never identified solely by the user name, but by the
combination of user + host (i.e., the machine or network address from
which the user is coming). It is good for security reasons to have it
this way.
You need to have either a user/host combination of `user`@`*` or else a
user `user`@`<your Windows machine's IP address>` in addition to
`user`@`localhost`. Grant the appropriate permissions to the
combination(s) you need.
Thanks - but no luck with the grant: mysql> grant ALL on *.* to
'root'@'10.1.2.15';
Query OK, 0 rows affected (0.00 sec)
Are these on the same intranet? Did you set up a password for
r... (AT) 10 (DOT) 1.2.15? It is a different user than root (AT) localhost (DOT)
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck... (AT) attglobal (DOT) net
==================
Yes, machines are on same intranet and are accessible (ping works, I
can see the connection request running tcpdump on the mysql machine).
No I haven't as I wasn't aware I needed to - how do I go about that?
Also, since my Win is DHCP based, how do I make it general and not IP
specific?

Thanks,

Following your comment, I saw on mysql.user that my user has no
password, I removed the password from Query Browser - it works.

Thanks for the pointer!
There's a whole section in the manual about user account management. I
suggest you read it closely:

http://dev.mysql.com/doc/refman/5.4/...anagement.html

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex (AT) attglobal (DOT) net
==================

Reply With Quote
  #8  
Old   
Peter H. Coffin
 
Posts: n/a

Default Re: Error 1045 when connecting via Query Browser - 11-23-2009 , 05:08 PM



On Mon, 23 Nov 2009 16:54:35 -0500, Jerry Stuckle wrote:
Quote:
Ran Shenhar wrote:

Following your comment, I saw on mysql.user that my user has no
password, I removed the password from Query Browser - it works.

Thanks for the pointer!

There's a whole section in the manual about user account management. I
suggest you read it closely:

http://dev.mysql.com/doc/refman/5.4/...anagement.html
One thing that bears mentioning that the manual doesn't make very
clear (mostly because everyone writing the manual is already familiar
with this) is that, when talking about user ids and hosts and the need
for adding them, 'localhost' is *special* and means "is connected
through the local, on-machine unix-ish socket file", and that does
*NOT* include connecting through the TCP loopback address frequently
named "localhost". It's also important (slightly less weird, slightly
more specialized) that it's vital to remember that the host connection
specifies the closest connecting point to the db server. Stuff like
phpMyAdmin needs the host to allow whatever user ID access from the
webserver, not the browser's IP address.

--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting. [TOFU := text oben,
Q: What is the most annoying thing on usenet? followup unten]

Reply With Quote
  #9  
Old   
Gordon Burditt
 
Posts: n/a

Default Re: Error 1045 when connecting via Query Browser - 11-23-2009 , 09:54 PM



Quote:
One thing that bears mentioning that the manual doesn't make very
clear (mostly because everyone writing the manual is already familiar
with this) is that, when talking about user ids and hosts and the need
for adding them, 'localhost' is *special* and means "is connected
through the local, on-machine unix-ish socket file", and that does
*NOT* include connecting through the TCP loopback address frequently
named "localhost".
Another thing worth knowing is that 'Localhost', 'lOcAlHoSt', and
similar names are *not* special and mean "is connected through the TCP
loopback address frequently named "localhost"".

Reply With Quote
  #10  
Old   
Captain Paralytic
 
Posts: n/a

Default Re: Error 1045 when connecting via Query Browser - 11-24-2009 , 06:35 AM



On 23 Nov, 20:22, Robert Hairgrove <rhairgr... (AT) bigfoot (DOT) com> wrote:
Quote:
Ran Shenhar wrote:

In MySQL, users are never identified solely by the user name, but by the
combination of user + host (i.e., the machine or network address from
which the user is coming). It is good for security reasons to have it
this way.

You need to have either a user/host combination of `user`@`*` or else a
user `user`@`<your Windows machine's IP address>` in addition to
`user`@`localhost`. *Grant the appropriate permissions to the
combination(s) you need.
Now then, I completely agree with this, but...
In cpanel there is a "Remote MySQL" option where ip addresses can be
listed. These addresses do not appear to be directly related to
specific users (as I would expect and hope them to be). So how is
this enabled?

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.