[NTLUG:Discuss] MySQL question
rob apodaca
robert.apodaca at attbi.com
Fri Jul 26 14:41:46 CDT 2002
...
> I still get:
> ERROR 1044: Access denied for user: '@localhost' to database '<databasename>'
> when I try to use <databasename> as user reid.
...
I think you have missed a step or two. Your error message indicates that you are logged in as a null user ('@localhost'). If you were logged in as reid, then it would say 'reid at localhost'. I suspect that the user 'reid' does not exist yet in mysql.
Try this:
$ mysql -u root -p mysql
msyql> select User, Password, Host from user;
You should see somthing like this:
+------+----------+-----------------------+
| User | Password | Host |
+------+----------+-----------------------+
| root | xxxxx | localhost |
| root | xxxxx | localhost.localdomain |
| reid | xxxxx | localhost |
+------+----------+-----------------------+
If you don't see your username in this table, then the name is not added. note that the password will be encrypted.
Here is how to add a new user:
http://www.mysql.com/documentation/mysql/bychapter/manual_MySQL_Database_Administration.html#Adding_users
Follow those instructions on adding a new user, then re-run the above query and see what you get.
good luck
More information about the Discuss
mailing list