[EMAIL PROTECTED] wrote:
Gerald Williams <[EMAIL PROTECTED]> 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
Note that if you set the password by directly editing (UPDATE) the
mysql.user table like this, you will have to run
FLUSH PRIVILEGES;
afterward to make the change take effect.
Alternatively, you can set the password with
SET PASSWORD FOR 'odbclogin'@'xpbox' = PASSWORD('odbc_pass');
or
SET PASSWORD FOR 'odbclogin'@'xpbox' = OLD_PASSWORD('odbc_pass');
or even
GRANT USAGE ON *.* TO 'odbclogin'xpbox'%' IDENTIFIED BY 'odbc_pass';
FLUSH PRIVILEGES is not necessary sfter any of these. See the manual for
the details <http://dev.mysql.com/doc/mysql/en/passwords.html>.
Michael
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]