Oracle 5.0 Reference Manual page 614

Table of Contents

Advertisement

entry to the
table with a
user
However, use of
Host
• If
mysql -u user_name test
not granted access to the given user for the database named other_db.
• If
mysql -u user_name
does not work when executed on a remote client host, you have not enabled access
u user_name
to the server for the given user name from the remote host.
• If you cannot figure out why you get
have
values containing wildcards (entries that contain
Host
error is to insert a new entry with
you to specify
localhost
is that the default privileges include an entry with
entry has a
value
Host
new entry when connecting from localhost! The correct procedure is to insert a second entry with
Host='localhost'
and User=''. After deleting the entry, remember to issue a
reload the grant tables. See also
• If you are able to connect to the MySQL server, but get an
issue a
SELECT ... INTO OUTFILE
table does not have the
• If you change the grant tables directly (for example, by using INSERT, UPDATE, or
statements) and your changes seem to be ignored, remember that you must execute a
statement or a
PRIVILEGES
reload the privilege tables. Otherwise, your changes have no effect until the next time the server is
restarted. Remember that after you change the
not need to specify the new password until after you flush the privileges, because the server will not
know you've changed the password yet!
• If your privileges seem to have changed in the middle of a session, it may be that a MySQL
administrator has changed them. Reloading the grant tables affects new client connections, but
it also affects existing connections as indicated in
Effect".
• If you have access problems with a Perl, PHP, Python, or ODBC program, try to connect to
the server with
mysql -u user_name db_name
db_name. If you are able to connect using the
not with the access privileges. (There is no space between
use the
--password=your_pass
[231]
option with no password value, MySQL prompts you for the password.)
password
• For testing purposes, start the
Then you can change the MySQL grant tables and use the
your modifications have the desired effect. When you are satisfied with your changes, execute
mysqladmin flush-privileges
you to begin using the new grant table contents without stopping and restarting the server.
• If you get the following error, you may have a problem with the
Access to database denied
If the entry selected from the
are one or more corresponding entries in the
applies to. This problem occurs infrequently because the
• If everything else fails, start the
debug=d,general,query
Causes of Access-Denied Errors
value that contains a wildcard; for example, 'pluto.%'.
Host
values ending with "%" is insecure and is not recommended!)
works but
mysql -u user_name other_db
works when executed on the server host, but
Access
Host='%'
to connect from the same machine. The reason that this does not work
that is more specific than '%', it is used in preference to the
'localhost'
and User='some_user', or to delete the entry with
Section 6.2.4, "Access Control, Stage 1: Connection
or
LOAD DATA INFILE
[577]
privilege enabled.
FILE
mysqladmin flush-privileges
[231]
syntax to specify the password. If you use the
server with the
mysqld
to tell the
table has an empty value in the
db
server with a debugging option (for example,
mysqld
[405]). This prints host and user information about attempted
594
denied, remove from the
or
'%'
and User='some_user', thinking that this enables
Host='localhost'
FLUSH PRIVILEGES
Access denied
statement, your entry in the
command to cause the server to
password with an
root
Section 6.2.6, "When Privilege Changes Take
or
mysql -u user_name -pyour_pass
client, the problem lies with your program,
mysql
and the password; you can also
-p
--skip-grant-tables
mysqlaccess
server to reload the privileges. This enables
mysqld
or
db
Host
table specifying which hosts the
host
table is rarely used.
host
does not, you have
mysql -h host_name -
table all entries that
user
characters). A very common
'_'
and User=''. Because that
Host='localhost'
statement to
Verification".
message whenever you
DELETE
FLUSH
statement, you will
UPDATE
-p
[420]
option.
script to check whether
table:
host
column, make sure that there
table entry
db
--
user
or
--

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents