Oracle 5.0 Reference Manual page 612

Table of Contents

Advertisement

shell>
mysqladmin --no-defaults -u root version
The option files that clients use are listed in
variables are listed in
• If you get the following error, it means that you are using an incorrect
shell>
mysqladmin -u root -pxxxx ver
Access denied for user 'root'@'localhost' (using password: YES)
If the preceding error occurs even when you have not specified a password, it means that you have
an incorrect password listed in some option file. Try the
in the previous item.
For information on changing passwords, see
If you have lost or forgotten the
Password".
• If you change a password by using
password using the
PASSWORD()
statements, the password will not work. For example, the following statement assigns a password,
but fails to encrypt it, so the user is not able to connect afterward:
SET PASSWORD FOR 'abe'@'host_name' = 'eagle';
Instead, set the password like this:
SET PASSWORD FOR 'abe'@'host_name' = PASSWORD('eagle');
The
[956]
PASSWORD()
or (beginning with MySQL 5.0.2)
command. Each of those automatically uses
Section 6.3.5, "Assigning Account
is a synonym for your local host name, and is also the default host to which clients try to
localhost
connect if you specify no host explicitly.
To avoid this problem on such systems, you can use a
the server host explicitly. This will make a TCP/IP connection to the local
also use TCP/IP by specifying a
host. In this case, the host name must be specified in a
though you are running the client program on the same host as the server.
• The
Access denied
which you are trying to connect, and whether you were using a password. Normally, you should have
one row in the
user
error message. For example, if you get an error message that contains
means that you tried to log in without a password.
• If you get an
Access denied
user_name, you may have a problem with the
and issuing this SQL statement:
root mysql
SELECT * FROM user;
The result should include a row with the
and your MySQL user name.
• If the following error occurs when you try to connect from a host other than the one on which the
MySQL server is running, it means that there is no row in the
matches the client host:
Causes of Access-Denied Errors
Section 2.21, "Environment
password, see
root
PASSWORD, INSERT, or UPDATE, you must encrypt the
SET
[956]
function. If you do not use
function is unnecessary when you specify a password using the
CREATE USER
Passwords", and
[231]
--host
error message tells you who you are trying to log in as, the client host from
table that exactly matches the host name and user name that were given in the
error when trying to connect to the database with
Host
592
Section 4.2.3.3, "Using Option
Variables".
--no-defaults
Section 6.3.5, "Assigning Account
Section C.5.4.1, "How to Reset the Root
statements, or the
[956]
to encrypt the password. See
PASSWORD()
Section 13.7.1.1,
--host=127.0.0.1
option that uses the actual host name of the local
table row on the server host, even
user
table. Check this by executing
user
and
columns matching your client's host name
User
user
Files". Environment
password:
root
[240]
option as described
Passwords".
[956]
for these
PASSWORD()
GRANT
mysqladmin password
"CREATE USER
Syntax".
[231]
option to name
server. You can
mysqld
using password:
mysql -u
mysql -u
table with a
value that
Host
NO, it

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents