Page 3 of 3 First 123
  • Jump to page:
    #31
  1. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    same problem -- ERROR 1045: Access denied for user:


    I am having the same problem. If you know how to fix it, please email me gregfranklindc@yahoo.com
  2. #32
  3. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)
  4. #33
  5. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: Access denied for user root???????


    Hi

    I have also same problem, I let you know my findings.Maksure that you /etc/hosts file has
    127.0.0.1 localhost.localdomain localhost
    192.168.1.1 test.mydomain.com test

    secondly try mysql -u root -h 127.0.0.1 -p
    or mysql -u root -h test.mydomain.com -p
    I hope you will be able to login, like me.

    In my user table root has not previliges against Host=localhost.but has previliges against my Host=mydomain. I am going to insert the entries manually and will let you know.
    If you have lost the password then run mysql in safe mod
    #safe_msqld --skip-gran-tables
    and update the password with localhost.

    Thanks

    Ejaz
  6. #34
  7. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: same problem -- ERROR 1045: Access denied for user:


    This is what you do.

    shell>mysql -u root -p password

    It will prompt you for your root password.

    If you have not set root password you can do so by following this.

    cd to shell>mysql\bin
    type mysql
    type GRANT ALL PRIVILEGES ON *.* TO root@localhost IDENTIFIED BY 'your_password' WITH GRANT OPTIONS;

    Then press enter.
    Then type.
    GRANT ALL PRIVILEGES ON *.* TO root@"%"localhost IDENTIFIED BY 'your_password' WITH GRANT OPTIONS;

    Press enter
    Then type:
    FLUSH PRIVILEGES;
    Press Enter.

    Now you should be able to login in but you must use the first command line example to do so.
  8. #35
  9. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: Access denied for user root???????


    OK, here's what you have to do.

    1. stop mysql server : this can be done through killall mysqld, and/or killall safe_mysqld if you start it using safe_mysqld

    2. restart mysql sever using the --skip-grant-tables, ie /usr/local/bin/safe_mysqld --skip-grant-tables &
    (make sure you background it or else you'll have to start a new shell), hit the return key to get back to the prompt
    ** your server is now wide open, use caution **

    3. add a new user using the insert statements :

    mysql> INSERT INTO user VALUES('localhost','monty',PASSWORD('some_pass'), 'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');

    mysql> INSERT INTO user VALUES('%','monty',PASSWORD('some_pass'), 'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');

    mysql> INSERT INTO user SET Host='localhost',User='admin',
    -> Reload_priv='Y', Process_priv='Y';

    mysql> INSERT INTO user (Host,User,Password)
    -> VALUES('localhost','dummy','');

    mysql> FLUSH PRIVILEGES;

    check http://www.mysql.com/doc/en/Adding_users.html
    for details

    4. stop mysql server : killall mysqld;killall safe_mysqld

    5. start mysql and login with your new passwords that you set in the INSERT statements above...

    **NOTE if you get "key duplicated errors" you will have to use the UPDATE methods instead of insert... but I just created a new database admin user "dbadmin" and made a new password.

    the correct grant command for this new user is : GRANT ALL PRIVILEGES ON *.* TO root@localhost IDENTIFIED BY 'y0uRn3w4dm1np@ss' WITH GRANT OPTION;

    good luck.

    chachi@freeshell.org
  10. #36
  11. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: Assumptions!!!


    Bah, crawl back under your rock. Someone took the great effort to explaining grant tables, one of the most powerful and misunderstood parts of MySQL and you want what? A hold-my-hand instant satisfaction personal free one-on-one counseling session?

    Lamer, go home.

    The first page actually has a link to the basic stuff..
  12. #37
  13. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: Assumptions!!!


    Simple Request:
    How do I stop someone from
    looking at tables??
    This obvious question is skipped over by all you fine gentleman.

    example: I put a password on root,
    but I can still start mysqld with NO password and select * from any data table.

    So I need to say: Dont start with Blank user
    This may be an Install thing.
    My point is that the mySQL manual and this fine site do NOT explain this.

  14. #38
  15. No Profile Picture
    Ducani
    Guest
    Devshed Newbie (0 - 499 posts)

    The MySQL Grant Tables


    The MySQL Grant Tables The MySQL Grant Tables

    March 01, 1999 - One of the most powerful aspects of the MySQL server is the amazing amount of control the administrator has over each user's intended behavior. This control can restrict user privileges over a general part of the server, such as limited access to an entire database, but can also be as specific as limiting privileges for a specific table or even column.

    Please discuss this article in this thread. You can read the article here .
Page 3 of 3 First 123
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo