Results 1 to 6 of 6

Thread: Access denied for user 'root'@'localhost' (using password: YES)

  1. #1
    cku123 is offline Member
    Join Date
    Mar 2008
    Posts
    5

    Default Access denied for user 'root'@'localhost' (using password: YES)

    Hello,

    I am using MySQL as the database for my SugarCRM application. I have been playing with the users and hosts in MySQL so that I can connect to the MySQL database from other workstations. In the process, I seemed to have messed up the 'root' user. Now I am unable to connect to the database. I get the Access denied for user 'root'@'localhost' (using password: YES) error when I try to open the MySQL administrator or try any type of connection.

    How can I re-enable the 'root' user without having to re-install?

    Any help is greatly appreciated!!

    Thanks,
    CK.

  2. #2
    mikesolomon is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    UK
    Posts
    1,638

    Default Re: Access denied for user 'root'@'localhost' (using password: YES)

    is there a user set up in mysql root@localhost ?

    can you access mysql from the command line?

    if so do

    mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost'
    -> IDENTIFIED BY 'some_pass' WITH GRANT OPTION;

    where 'some_pass' is the password you want to use

  3. #3
    mikesolomon is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    UK
    Posts
    1,638

    Default Re: Access denied for user 'root'@'localhost' (using password: YES)

    Quote Originally Posted by cku123
    Hello,

    I am using MySQL as the database for my SugarCRM application. I have been playing with the users and hosts in MySQL so that I can connect to the MySQL database from other workstations. In the process, I seemed to have messed up the 'root' user. Now I am unable to connect to the database. I get the Access denied for user 'root'@'localhost' (using password: YES) error when I try to open the MySQL administrator or try any type of connection.

    How can I re-enable the 'root' user without having to re-install?

    Any help is greatly appreciated!!

    Thanks,
    CK.
    what u have probably done is changed root@localhost to root@%

    u need two users one root@% that can access from any machine and root@localhost to access from localhost - hope that makes sense

  4. #4
    ptemplin7 is offline Sugar Community Member
    Join Date
    Jun 2007
    Location
    Puget Sound Washington
    Posts
    380

    Default Re: Access denied for user 'root'@'localhost' (using password: YES)

    Since your have been playing around witht eh hosts file. as suggested above. Login using the root@<IP> you last set int eh host file.

    a tool like myphpadmin, if you can get in is very useful for seeing what is in the actual tables. Also, may help you set us the various combination of root@???? you need to get it working again.

    I forget where I got it, but there is a method for disabling the mysql protection allowing you access with out the authetication. This can be found by searching on the web. Once disabled, get in, reset the master password and clean up what caused the problem in the first place.

    Good luck,
    Paris

  5. #5
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    5,205

    Default Re: Access denied for user 'root'@'localhost' (using password: YES)

    It is also possible that you might need to re-install the privileges tables.

    You can do that via the mysql_install_db utility.

    Make sure you backup your data beforehand.

    More info on mysql_install_db: http://dev.mysql.com/doc/refman/5.0/...nstall-db.html
    Regards,

    Angel Magaņa
    Technical Solutions Architect
    Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
    Blog: http://cheleguanaco.blogspot.com.
    Twitter: @cheleguanaco.

  6. #6
    hosseinjafaryjozany is offline Junior Member
    Join Date
    Jun 2011
    Posts
    1

    Thumbs down Re: Access denied for user 'root'@'localhost' (using password: YES)

    Quote Originally Posted by mikesolomon View Post
    is there a user set up in mysql root@localhost ?

    can you access mysql from the command line?

    if so do

    mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost'
    -> IDENTIFIED BY 'some_pass' WITH GRANT OPTION;

    where 'some_pass' is the password you want to use
    i did and lost access to mysql .are you sure?

Thread Information

Users Browsing this Thread

There are currently 20 users browsing this thread. (0 members and 20 guests)

Similar Threads

  1. Error 1045: Access denied for user 'root'@'localhost'
    By cdurley in forum Installation and Upgrade Help
    Replies: 7
    Last Post: 2011-08-05, 11:29 AM
  2. Access denied for user 'ODBC'@'localhost' (using password: NO)
    By mkshaji in forum Installation and Upgrade Help
    Replies: 1
    Last Post: 2007-07-25, 05:43 PM
  3. Uninstalling a test module
    By ACMartin55 in forum Help
    Replies: 0
    Last Post: 2006-09-12, 08:13 PM
  4. MySQL error/no workflow notifications
    By rlbyrd in forum Help
    Replies: 1
    Last Post: 2006-09-11, 09:14 PM
  5. Replies: 1
    Last Post: 2005-08-02, 06:39 PM

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
  •