SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru
    Join Date
    Jun 2009
    Posts
    815
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    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:

    Code:
    mysql -u root p
    but before it even prompts me for a password, I get this error:

    Code:
    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..

  2. #2
    SitePoint Wizard guelphdad's Avatar
    Join Date
    Oct 2003
    Location
    St. Catharines, ON Canada
    Posts
    1,708
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    type your password directly after -p and see if that works:
    mysql -u root -pyourpasswordhere

  3. #3
    SitePoint Guru
    Join Date
    Jun 2009
    Posts
    815
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    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

    Code:
    mysql -u root -p yourpasswordhere
    first, and it didn't work....;-)

    thanks again..


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •