If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Cannot connect to database

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-18-05, 19:45
nballon nballon is offline
Registered User
 
Join Date: Oct 2005
Posts: 3
Exclamation Cannot connect to database

I am new at this so I will be brief. I keep getting this error when I try to add tables from the command line using MySQL - ERROR 1044: Access denied for user: '@localhost'...can someone show me or point me in the right direction to change the access so that I can start adding elements to my database?

thanks!
Reply With Quote
  #2 (permalink)  
Old 10-19-05, 02:43
tombell tombell is offline
Registered User
 
Join Date: Jun 2005
Posts: 23
Post the exact command you are using to connect to the server
Reply With Quote
  #3 (permalink)  
Old 10-19-05, 04:40
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,260
What privileges do you have to that database / server
what Grants have been assigned

Have a look at the MySQL manager for 'Grant Privileges'
Reply With Quote
  #4 (permalink)  
Old 10-19-05, 23:03
nballon nballon is offline
Registered User
 
Join Date: Oct 2005
Posts: 3
The command I am using

Is "use testDB;"......as far as the priviliges are concerned, I am simply doing exercises on my laptop so I am the registered owner. I couldnt locate the "Grant Privileges" option in MySQL..any idea where to help a ROOKIE??
Reply With Quote
  #5 (permalink)  
Old 10-20-05, 13:00
jfulton jfulton is offline
Registered User
 
Join Date: Apr 2005
Location: Baltimore, MD
Posts: 297
You need to set up a user to have the correct permissions and then log in as that user.

Pretty sure you didn't log in to mysql (hence the: ''@localhost). Log in like:
Code:
mysql --user=user_name --password=your_password db_name
Also, do you have the users set up correctly? To set up a new user with all permissions try something like:

Code:
GRANT ALL PRIVILEGES ON * . * 
TO 'user_name'@'localhost' 
IDENTIFIED BY 'your_password' 
WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0
MAX_CONNECTIONS_PER_HOUR 0 
MAX_UPDATES_PER_HOUR 0 ;
Replacing 'user_name' and 'your_password' with the correct info. Then log in as that user.



or even easier, get phpMyAdmin
Reply With Quote
  #6 (permalink)  
Old 10-20-05, 14:21
nballon nballon is offline
Registered User
 
Join Date: Oct 2005
Posts: 3
Ok

will do! thanks again for the assistance and I am SURE I will be back if I have any more problems/issues! Good looking out!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On