Database Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesDatabase Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old December 14th, 2004, 11:47 PM
Young Young is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Vancouver, British Columbia
Posts: 53 Young User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
Exclamation Trouble with MySQL error

Hello,

I haven't used MySQL for while and I am trying to use it again for my project. I already have
my user name and password set up from previous usage. When I type the following:

shell> mysql -u my_username -h localhost -p
Enter password: mypassword

the following error appears

Error 1045: Access denied for user my_username@localhost (Using password: YES)

How can I fix this problem? I also want to know where I can find my.ini or my.cnf file. Thank you in advance.
Cheers.

Young

P.S: I almost forgot, my OS is Windows XP professional and the version of MySQL is 4.0.20a

Last edited by Young : December 14th, 2004 at 11:48 PM. Reason: forgot to add versions of OS and MySQL

Reply With Quote
  #2  
Old December 16th, 2004, 01:09 PM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 4 m 48 sec
Reputation Power: 8
You might want to try taking the spaces out between -u and -h
I've had similar things happen before.
mysql -uusername -hlocalhost -p (you can ommit -h if its localhost)

You could even try omitting everything and simply calling mysql.exe
Some people forget to apply passwords to root@localhost, and some people leave the noname/nopassword account active...

Otherwise, perhaps reinstalling MySQL is a solution?

my.ini and my.cnf could be in your Windows directory...

Again, all this depends on how you originally set mysql up.

Reply With Quote
  #3  
Old December 19th, 2004, 01:58 PM
Young Young is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Vancouver, British Columbia
Posts: 53 Young User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
Thank you

Hello,

Sorry for replying so late, I just read the message now. Thank you very much for your help again.
It happens to be that when I type in the root (the default user name) along with -h localhost -u root -p, then
everything perfectly works. Could it be that when I first set up MySQL I might not have set up my username? Anyhow,
I will look further into this. Read more documents, and ask questions. Anyhow, thank you very much and merry Christmas.


Young

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesDatabase Development > Trouble with MySQL error


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway