robert_rowe wrote:
Issuing this command:


mysql>SET PASSWORD FOR 'root'@'localhost' = PASSWORD xxxxxxxxxx

set your password to xxxxxxxxxx

I'm not so sure. PASSWORD is a function which expects a string. The correct syntax is


SET PASSWORD FOR 'root'@'localhost' = PASSWORD('new_password')

so I don't believe this worked unless Don is misquoting what he did.

You will need to use

mysql -u root -p xxxxxxxxxx

This will not work. You may not put a space between the -p and the password. The space indicates that xxxxxxxxxx is the db to use. If you want to provide the password on the command line (not really a good idea), the syntax is


mysql -u root -pxxxxxxxxxx

See, no space between the -p and the password.

from the local machine to get access with the root user.

This:

mysql -u root -p

is specifying a blank password.

No, it is not. The -p indicates you want to give a password to authenticate. Since you didn't provide the password on the command line, mysql will prompt you for it.



I believe that this:


mysql -u root

will prompt you for the password without echoing it to the screen.

No. This will try to authenticate without a password, which will only work if the specified user (root, in this case) has no password.


Don,

I expect that when you enter `mysql -u root -p`, you get prompted for a password and then get an error message. It would help if you would please post the exact text of the error message. In the meantime, try your old password (or no password, `mysql -u root`, if root didn't have one before), in case the SET PASSWORD failed.

Alternatively, take a look at "How to Reset a Forgotten Root Password" <http://www.mysql.com/doc/en/Resetting_permissions.html> in the manual for the directions on how to use --skip-grant-tables to recover your root mysql password.

Michael


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to