SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot fredmintah's Avatar
    Join Date
    Jun 2004
    Location
    Ghana
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Please help me out. Can't access my databases

    Hello buddies,
    I not soo good in the MySQL environment so pardon me out. I having been using my MySQL server for some time now but I realized there was not security set on the server and decided to set a password for any user who logs On . But I cannot not access any of my databases any longer. I issued this command at the prompt to put the security in the mysql database.
    Code:
     update user set Password='abc123' where User='root'.
    Now I cannot access the databases on the server any longer. I can log-In without a password but always get access denied when I try to select a database. And when I also try to use the password when logging-In I get the access denied message again. Please help me out buddies.
    Thanks
    Last edited by fredmintah; Jul 10, 2004 at 11:50.

  2. #2
    Chessplayer kleineme's Avatar
    Join Date
    Apr 2004
    Location
    Germany
    Posts
    608
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    you should have used

    Code:
    update user set Password= password('abc123') where User='root';
    see http://dev.mysql.com/doc/mysql/en/Passwords.html

    If you set privileges/passwords with an UPDATE statement you have to refresh them with a FLUSH PRIVILEGES command.

    If you can't set the password any more you may want to look at any of many websites which explain the procedure to be taken if you have lost your password, e.g.

    http://www.alt-php-faq.org/local/70/
    Never ascribe to malice,
    that which can be explained by incompetence.
    Your code should not look unmaintainable, just be that way.

  3. #3
    SitePoint Zealot fredmintah's Avatar
    Join Date
    Jun 2004
    Location
    Ghana
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I will trying it right away

    Thanks buddy I will be trying it now. I appreciate it.

    Quote Originally Posted by kleineme
    Hi,

    you should have used

    Code:
    update user set Password= password('abc123') where User='root';
    see http://dev.mysql.com/doc/mysql/en/Passwords.html

    If you set privileges/passwords with an UPDATE statement you have to refresh them with a FLUSH PRIVILEGES command.

    If you can't set the password any more you may want to look at any of many websites which explain the procedure to be taken if you have lost your password, e.g.

    http://www.alt-php-faq.org/local/70/

  4. #4
    SitePoint Enthusiast
    Join Date
    Jul 2004
    Location
    Mars
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    fredmintah you should just reinstall the mysql server
    Or just stop it, remove the 'mysql' database with a database which has only 1 user (root), with no password. You can find one such database when you install mysql.

  5. #5
    SitePoint Zealot fredmintah's Avatar
    Join Date
    Jun 2004
    Location
    Ghana
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I have reinstalled

    I have re-installed the mysql server as told by designworx and have now set the password as I was told to do by kleineme. Thanks to you all in this community. You are really doing a wonderful job for some of us.

    Quote Originally Posted by designworx
    fredmintah you should just reinstall the mysql server
    Or just stop it, remove the 'mysql' database with a database which has only 1 user (root), with no password. You can find one such database when you install mysql.


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
  •