faqts : Computers : Programming : Languages : PHP : Database Backed Sites : MySQL

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

32 of 44 people (73%) answered Yes
Recently 5 of 10 people (50%) answered Yes

Entry

solving the problem with message (error 1044: access denied for user: "@localhost' to database)?

Apr 27th, 2005 05:20
Keyar Srinivasan, mohdy salah,


You are still connecting to the database without a username. If you 
were using a username that was invalid the error would be:
ERROR 1044: Access denied for user: 'someusername@localhost' to 
database ' mysql'
If you have not set up an account on mysql then you need to do 
something like:
grant all privileges on *.* to someusername@localhost identified 
by 'somepassword';
(Please make sure you understand the implications of doing this)
This grants all privileges to all tables in all databases 
to 'someusername' using 'somepassword' if they are connecting 
from 'localhost'.
Once you have this, whatever is connecting to mysql needs to use this 
username and password. Currently it does not look like your client is 
using a username/password.