Neil, > GRANT ALL PRIVILEGES ON newsletter.* TO newsletter IDENTIFIED BY 'testPass'; > FLUSH PRIVILEGES; > I then tried to access the databse via the command-line client: > /usr/local/mysql/bin/mysql -u newsletter -ptestPass newsletter > And I get this error: > ERROR 1045: Access denied for user: 'newsletter@localhost' (Using password: > YES)
I don't know if you have any other entries in the mysql.user / mysql.db tables. If so, there could be another entry for 'newsletter'@'something_else_but_not_%'. Whatever the reason - it's always a good idea to specify user names the "classical" MySQL way, i. e. 'user'@'machine', and not - as in most other DBMS - only as 'user'. What the manual says about it, is: "The simple form user is a synonym for user@"%"." Details: http://www.mysql.com/doc/en/GRANT.html Regards, -- Stefan Hinz <[EMAIL PROTECTED]> Geschäftsführer / CEO iConnect GmbH <http://iConnect.de> Heesestr. 6, 12169 Berlin (Germany) Tel: +49 30 7970948-0 Fax: +49 30 7970948-3 ----- Original Message ----- From: "Neil Aggarwal" <[EMAIL PROTECTED]> To: "Mysql list" <[EMAIL PROTECTED]> Sent: Wednesday, January 15, 2003 6:00 PM Subject: Password problem > Hello: > > As the root user, I created a new database and user account: > CREATE DATABASE newsletter; > GRANT ALL PRIVILEGES ON newsletter.* TO newsletter IDENTIFIED BY 'testPass'; > FLUSH PRIVILEGES; > > I then tried to access the databse via the command-line client: > /usr/local/mysql/bin/mysql -u newsletter -ptestPass newsletter > > And I get this error: > ERROR 1045: Access denied for user: 'newsletter@localhost' (Using password: > YES) > > I checked that mysql has it set-up correctly in the user and db tables > by logging in as the root account. > > select * from user give me this line: > | % | newsletter | 61fa73f50740c213 | N | > N | N | N | N | N | N > | N | N | N | N | N | > N | N > > select * from db gives me this line: > | % | newsletter | newsletter | Y | Y > | Y | Y | Y | Y | N | Y > | Y | Y | > > Any ideas? > > Thanks, > Neil. > > -- > Neil Aggarwal > JAMM Consulting, Inc. (972) 612-6056, http://www.JAMMConsulting.com > Custom Internet Development Websites, Ecommerce, Java, databases > > > --------------------------------------------------------------------- > 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 > --------------------------------------------------------------------- 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