maya90 — 2012-05-12T00:26:19-04:00 — #1
this has never happened to me before:
I can connect with PHP and with JSP (& do updates), but not from unix shell...
from unix shell I do the usual:
mysql -u root –p
but before it even prompts me for a password, I get this error:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
am trying to connect again after about six months, have not had difficulty with this before (again: problem connecting only from unix shell, not from PHP or JSP.. so obviously the server is turned on..;-) this has really never happened to me before....
this is all in my local machine (mac/unix)
would appreciate some suggestions.. thank you..
guelphdad — 2012-05-13T16:12:47-04:00 — #2
type your password directly after -p and see if that works:
mysql -u root -pyourpasswordhere
maya90 — 2012-05-13T18:17:41-04:00 — #3
my gosh -- that worked!!! thank you very much...
(still wonder why now have to do it like this, I've installed & used MySQL a no. of times on windows machines also, and I've never had to do this.. but well.. it works, that's what matters..
(it never would have occurred to me to do it w/o the space before password.. I would have tried with how it's done for the root..
(in fact I tried
mysql -u root -p yourpasswordhere
first, and it didn't work....;-)