List:General Discussion« Previous MessageNext Message »
From:SGreen Date:September 20 2005 5:29pm
Subject:Re: Can't connect to mysql server from another windows box
View as plain text  
Gerald Williams <guthro@stripped> wrote on 09/20/2005 10:49:22 AM:

> MySQL 5.0.12, P2P Microsoft network
> 
> I cannot get the manual's instructions (24.1.9.6) to work for 
> connecting from a mysql client on a windows machine to a mysql 
> server running on another windows machine (xp and w2kpro repsectively)
> 
> The client machine can ping the server machine by name or IP address.
> One each machine, a local client successfully connects to the local 
> mysql server as localhost.
> In mysql server on the w2k box, a client row in mysql.user has been 
> created with:
>    user=the exact value used in the ODBC Admin dialog
>    password=the exact value used in the ODBC Admin dialog
>    Host=name of the machine being used as a client 
> 'skip-networking' is not set on either machine.
> 
> But when ODBCAdmin (3.51) is used to create a DSN on the winxp 
> machine for connecting to the mysql server on the w2k machine, 
> clicking 'Test Data Source' yields this error:
> 
>    Host 'XPBOX' is not allowed to connect to this MySQL server'.
> 
> (Oddly, the mysql server capitalizes the name of the winxp box. Why 
> does it do that?)
> 
> Issuing the command
>    telnet w2kbox 3306
> on the xpbox also produced this same error message.
> 
> This ought to be simple. What's the secret?
> 

From your description, the mostly likely problem is that the password 
field of the user table is NOT a hashed password value. The authentication 
attempt would fail because the database is trying to compare a hashed 
password (coming from your ODBC driver) to a non-hashed value.  Use the 
PASSWORD() function to hash a plain-text password for the user so that it 
will match the authentication attempt from the driver

update mysql.user set password = PASSWORD(`password`) WHERE user = 
'odbclogin';

http://dev.mysql.com/doc/mysql/en/encryption-functions.html

A second reason could be because the MySQL ODBC driver is acting as a 
PRE-4.1 client (it is using the shorter password hashes that existed 
before v4.1). 

update mysql.user set password = OLD_PASSWORD('plaintext_of_password') 
WHERE user = 'odbclogin';

http://dev.mysql.com/doc/mysql/en/old-client.html


Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine





Thread
Can't connect to mysql server from another windows boxGerald Williams20 Sep
  • Re: Can't connect to mysql server from another windows boxSGreen20 Sep
Re: Can't connect to mysql server from another windows boxMichael Stassen20 Sep
Re: Can't connect to mysql server from another windows boxGerald Williams20 Sep
Re: Can't connect to mysql server from another windows boxGerald Williams20 Sep