Can connect with PHP & JSP, but not from unix shell

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…:wink: this has really never happened to me before…

this is all in my local machine (mac/unix)

would appreciate some suggestions… thank you…

type your password directly after -p and see if that works:
mysql -u root -pyourpasswordhere

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… :slight_smile:

(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…:wink:

thanks again…