Oracle 5.0 Reference Manual page 613

Table of Contents

Advertisement

Host ... is not allowed to connect to this MySQL server
You can fix this by setting up an account for the combination of client host name and user name that
you are using when trying to connect.
If you do not know the IP address or host name of the machine from which you are connecting, you
should put a row with
the client machine, use a
the
in the
'%'
user
system is left insecure because it permits connections from any host for the given user name.
On Linux, another reason that this error might occur is that you are using a binary MySQL version
that is compiled with a different version of the
you should either upgrade your operating system or glibc, or download a source distribution of
MySQL version and compile it yourself. A source RPM is normally trivial to compile and install, so
this is not a big problem.
• If you specify a host name when trying to connect, but get an error message where the host name
is not shown or is an IP address, it means that the MySQL server got an error when trying to resolve
the IP address of the client host to a name:
shell>
mysqladmin -u root -pxxxx -h some_hostname ver
Access denied for user 'root'@'' (using password: YES)
If you try to connect as
table with a
user
User
your client:
Access denied for user ''@'unknown'
These errors indicate a DNS problem. To fix it, execute
internal DNS host cache. See
Some permanent solutions are:
• Determine what is wrong with your DNS server and fix it.
• Specify IP addresses rather than host names in the MySQL grant tables.
• Put an entry for the client machine name in
Windows.
• Start
with the
mysqld
• Start
with the
mysqld
• On Unix, if you are running the server and the client on the same machine, connect to
localhost. Unix connections to
• On Windows, if you are running the server and the client on the same machine and the server
supports named pipe connections, connect to the host name
named pipe rather than TCP/IP.
• If
mysql -u root test
(where
Access denied
not have the correct name for your host in the
value in the
Host
user
resolution routines return a fully qualified domain name (or vice versa). For example, if you have
an entry with host
'pluto'
is 'pluto.example.com', the entry does not work. Try adding an entry to the
contains the IP address of your host as the
Causes of Access-Denied Errors
as the
column value in the
'%'
Host
SELECT USER()
table row to the actual host name that shows up in the log. Otherwise, your
and get the following error, it means that you do not have a row in the
root
column value of
'root'
Section 8.9.8, "DNS Lookup Optimization and the Host
--skip-name-resolve
--skip-host-cache
localhost
works but
mysql -h your_hostname -u root test
your_hostname
table row specifies an unqualified host name, but your system's name
in the
table, but your DNS tells MySQL that your host name
user
Host
593
table. After trying to connect from
user
query to see how you really did connect. Then change
library than the one you are using. In this case,
glibc
and that
mysqld
mysqladmin flush-hosts
on Unix or
/etc/hosts
[420]
option.
[420]
option.
use a Unix socket file rather than TCP/IP.
(period). Connections to
.
is the actual host name of the local host), you may
table. A common problem here is that the
user
column value. (Alternatively, you could add an
cannot resolve the host name for
to reset the
Cache".
\windows\hosts
results in
table that
user
on
use a
.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents