»Philip Mak« sagte am 2002-02-19 um 10:25:38 -0500 : > One thing's been bothering me for a while: When I create a user and > database in MySQL, the user always ends up with an extra entry with > host='%' and password=''. How is this happening? This is how I create > a new database and user: > > mysql> create database xxx; > Query OK, 1 row affected (0.01 sec) > > mysql> insert into user set host='localhost', user='xxx', password=password('yyy');
Here you set that the user "xxx" has the password yyy. > mysql> grant all privileges on xxx.* to xxx; Here you insert another user but don't set a password! BTW: You don't have to insert the user manually. If you try to GRANT access to a non existing user, the user will be silently created. Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.iso-top.de | Jabber: [EMAIL PROTECTED] iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 6 days 9 hours 56 minutes --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php