![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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, |
#3
| |||
| |||
|
|
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. |
#4
| |||
| |||
|
|
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) |
#5
| |||
| |||
|
|
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 ================== |
#6
| |||
| |||
|
|
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, |
#7
| |||
| |||
|
|
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! |
#8
| |||
| |||
|
|
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 |
#9
| |||
| |||
|
|
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". |
#10
| |||
| |||
|
|
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... |
![]() |
| Thread Tools | |
| Display Modes | |
| |