Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Question about mysql command

    Hi folks,

    On typing following lines granting privilege;

    mysql> GRANT SELECT ON mailserver.*
    -> TO mailuser@localhost
    -> IDENTIFIED BY 'password; [Enter]
    Query OK, 0 rows affected (0.00 sec)

    I discovered later miss-typing "mailuser" as "maluser". Please advise how can I rectify it. Or how to delete that privilege and then recreate another one.

    Besides what command shall I run to show virtual users

    mysql> show virtual_user

    doesn't work.



  2. #2
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Nottingham, England
    It doesn't look like we have that many sql experts here, so I'll give the only advice I can.

    I've played about with MySQL and I've always ended up putting a tool like phpmyadmin on the SQL server so I can tweak stuff properly. It's far too much hard work to go doing this by hand through the command line.

    Just don't put phpmyadmin on a server that faces the internet - there are some rather thick script kiddies around that will try to use it to gain entry.
    Linux user #126863 - see

  3. #3
    Just Joined!
    Join Date
    Nov 2005
    You got to drop the user from the user table. And receate the user from mysql shell. And more importantly you got to type flush peiviledges; To take the grant table take effect of that.

    Last edited by unixbhaskar; 09-10-2008 at 01:15 PM. Reason: typos

  4. $spacer_open
  5. #4
    Hi Roxoff and unixbhaskar,

    Thanks for your advice.

    I got my problem fixed by running;

    mysql > USE mysql;

    mysql > update user set User = "mailuser" where User = "maluser";
    mysql > flush privileges;

    A side question;

    If typing;
    mysql > line 1
          > line 2
          > line 3
          > line 4
    suddenly I discover a mistake on line 2. Can I jump back to line 2 making correction? If YES, please advise how. TIA


Posting Permissions

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