using 5.1.57 on Mac Lion.
<blush> I've done this a dozen times, but I've missed something.
Am setting up a new mysql installation ...
I have granted a user as follows (between lines of asterisks)
************************************************************
linus:~ tim$ sudo mysql
Password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 20
Server version: 5.1.57 Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> GRANT ALL PRIVILEGES ON *.* TO 'tim'@'localhost' IDENTIFIED BY 'secret'  
WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)

mysql> quit;
Bye
************************************************************
Now when I try to log in with host as localhost, user as tim
with 'secret' password:
linus:~ tim$ mysql --host=localhost --user=tim --password=secret
ERROR 1045 (28000): Access denied for user 'tim'@'localhost' (using password: 
NO)
Huh!
If I login into the server as root again:
linus:~ tim$ sudo mysql
mysql> show grants for tim@localhost;
+---------------------------------------------------------------------------------------------------------------------------------------+
| Grants for tim@localhost                                                      
                                                        |
+---------------------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'tim'@'localhost' IDENTIFIED BY PASSWORD 
'*E8482E479FD05E800263C26A724513BBBFAA108B' WITH GRANT OPTION |
+---------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
It appears that the user is there.
Is there a difference in the syntax with this version for providing
the password?
If I try 
mysql -h localhost -u tim -p
I get
ERROR 1045 (28000): Access denied for user 'tim'@'localhost' (using password: 
NO)
just as in the example above.
Have I forgotten to do something in the setup?

TIA
-- 
Tim 
tim at tee jay forty nine dot com or akwebsoft dot com
http://www.akwebsoft.com

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to