Professional Web Applications Themes

error mysql when I clean all the other null account in mysql database that located in table user - MySQL

Dear all, I tried to clean the default information in the mysql database that located in user table. When use the >mysql -uroot -proot it is working, but when I clean and delete some data in the user table by calling the following SQL statement: DELETE FROM user WHERE User= ' '; DELETE FROM user WHERE User=' ' AND HOST='localhost'; DELETE FROM user WHERE User='root' AND Password=' '; after calling the above SQL statement, then I try to use >mysql -uroot -proot It displays the following error: ERROR 1045 (28000): Access denied for user 'root''localhost' (using password: YES) Any solution?...

  1. #1

    Default error mysql when I clean all the other null account in mysql database that located in table user

    Dear all,

    I tried to clean the default information in the mysql database that
    located in user table. When use the >mysql -uroot -proot
    it is working, but when I clean and delete some data in the user table
    by calling the following SQL statement:
    DELETE FROM user WHERE User= ' ';
    DELETE FROM user WHERE User=' ' AND HOST='localhost';
    DELETE FROM user WHERE User='root' AND Password=' ';

    after calling the above SQL statement, then I try to
    use >mysql -uroot -proot

    It displays the following error:
    ERROR 1045 (28000): Access denied for user 'root''localhost' (using
    password: YES)

    Any solution?

    kwan Guest

  2. #2

    Default Re: error mysql when I clean all the other null account in mysql database that located in table user

    On May 23, 2:24 pm, kwan <com> wrote: 


    The mysqld service is running as normal,

    kwan Guest

  3. #3

    Default Re: error mysql when I clean all the other null account in mysql database that located in table user

    On May 23, 2:24 pm, kwan <com> wrote: 


    The mysqld service is running as normal,

    kwan Guest

  4. #4

    Default Re: error mysql when I clean all the other null account in mysql database that located in table user

    On May 23, 11:24 am, kwan <com> wrote: 

    Have you tried: flush privileges; after making those changes? Are you
    sure that the root account that you were using your password with was
    set up with the host as localhost? Perhaps your root account only has
    access to the mysql table? Try getting in directly to the mysql
    database with just: mysql -uroot mysql, and then try it with mysql -
    uroot -proot mysql.

    Nino

    nino9stars@yahoo.com Guest

  5. #5

    Default Re: error mysql when I clean all the other null account in mysql database that located in table user

    On May 23, 11:24 am, kwan <com> wrote: 

    Have you tried: flush privileges; after making those changes? Are you
    sure that the root account that you were using your password with was
    set up with the host as localhost? Perhaps your root account only has
    access to the mysql table? Try getting in directly to the mysql
    database with just: mysql -uroot mysql, and then try it with mysql -
    uroot -proot mysql.

    Nino

    nino9stars@yahoo.com Guest

  6. #6

    Default Re: error mysql when I clean all the other null account in mysql database that located in table user

    > > I tried to clean the default information in the mysql database that 


    > [/ref]

    Have you tried: flush privileges; after making those changes? Are you
    sure that the root account that you were using your password with was
    set up with the host as localhost? Perhaps your root account only has
    access to the mysql table? Try getting in directly to the mysql
    database with just: mysql -uroot mysql, and then try it with mysql -
    uroot -proot mysql.

    Nino

    nino9stars@yahoo.com Guest

  7. #7

    Default Re: error mysql when I clean all the other null account in mysql database that located in table user

    On May 23, 2:34 pm, "com" <com>
    wrote: [/ref]
    > [/ref]
    > [/ref]
    > [/ref]
    >
    > Have you tried: flush privileges; after making those changes? Are you
    > sure that the root account that you were using your password with was
    > set up with the host as localhost? Perhaps your root account only has
    > access to the mysql table? Try getting in directly to the mysql
    > database with just: mysql -uroot mysql, and then try it with mysql -
    > uroot -proot mysql.
    >
    > Nino[/ref]


    No I already stop and restart the mysqld service, and call the FLUSH
    PRIVILEGES too, and I have try the same way as you tell me, but it
    still doesnt work anyway

    hope to get solution very soon, thank you

    kwan Guest

  8. #8

    Default Re: error mysql when I clean all the other null account in mysql database that located in table user

    On May 23, 2:34 pm, "com" <com>
    wrote: [/ref]
    > [/ref]
    > [/ref]
    > [/ref]
    >
    > Have you tried: flush privileges; after making those changes? Are you
    > sure that the root account that you were using your password with was
    > set up with the host as localhost? Perhaps your root account only has
    > access to the mysql table? Try getting in directly to the mysql
    > database with just: mysql -uroot mysql, and then try it with mysql -
    > uroot -proot mysql.
    >
    > Nino[/ref]


    No I already stop and restart the mysqld service, and call the FLUSH
    PRIVILEGES too, and I have try the same way as you tell me, but it
    still doesnt work anyway

    hope to get solution very soon, thank you

    kwan Guest

  9. #9

    Default Re: error mysql when I clean all the other null account in mysql database that located in table user

    > > > > I tried to clean the default information in the mysql database that [/ref]
    > [/ref][/ref]

    Did you ever actually grant privileges to user: root with password:
    root on host: localhost? I don't remember the default set up of mysql
    having root;root as being set up. The system might have been confused
    and just assumed you were entering as root with any valid password...

    So, my understanding is that you cannot even get into the system to
    make changes? If that's the case, you should follow the directions
    here:
    http://dev.mysql.com/doc/refman/5.1/en/resetting-permissions.html
    so you can get back on the system and check to see what you did wrong.
    Be very sure about your tables before you flush privileges (especially
    when making manual changes) so something like this doesn't happen
    again.

    Nino

    nino9stars@yahoo.com Guest

Similar Threads

  1. User Access to MySQL Database
    By Bob Sanderson in forum MySQL
    Replies: 6
    Last Post: June 3rd, 12:39 PM
  2. Replies: 0
    Last Post: January 29th, 02:03 PM
  3. Mac user can't connect to mySQL database
    By benkayuk in forum Macromedia ColdFusion
    Replies: 5
    Last Post: March 4th, 03:25 PM
  4. Valid MySQL database/table/column name regexp
    By Martin Lucas-Smith in forum PHP Development
    Replies: 3
    Last Post: August 15th, 07:41 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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139