"Mike Mapsnac" <[EMAIL PROTECTED]> wrote:
> I spend some time to figure how to add users with passwords, but have 
> problem with following:
> 
> ################################################
> Adding user with password: PROBLEM
> ################################################
> When I insert users to database:
> insert into user values('localhost','test', 
> password('123456'),'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
> and specy the password , I cannot login t the database
> 
> [EMAIL PROTECTED] mike]# mysql -h localhost -u test -p
> Enter password:
> ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES)

If you edit privilege tables manually (with INSERT, UPDATE, DELETE statements) you 
should run mysqladmin flush-privileges or execute FLUSH PRIVILEGES command to reload 
grant tables.

> ################################################
> Adding user to database with no password : NO PROBLEMS
> ################################################
> But when I create user without password I have no problems:
> insert into user values('localhost','test', 
> '','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
> 
> [EMAIL PROTECTED] mike]# mysql -h localhost -u test1
> Welcome to the MySQL monitor.  Commands end with ; or \g.
> Your MySQL connection id is 15 to server version: 3.23.58
> 
> Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
> 
> mysql>
> 
> 
> Any ideas what I'm doing wrong?

You added user [EMAIL PROTECTED] without password, but connected using test1 user 
name. Seems you have entry for anonymous user without password in the 'user' table, 
that is why you can connect as user test1. 


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com





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

Reply via email to