View Full Version : Mysql question
satimis
4th September 2008, 12:37
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.
TIA
B.R.
satimis
jon
4th September 2008, 16:42
You can use the DROP USER statement as described here ... http://dev.mysql.com/doc/refman/5.0/en/drop-user.html
Then just add the right user after.
satimis
4th September 2008, 18:02
You can use the DROP USER statement as described here ... http://dev.mysql.com/doc/refman/5.0/en/drop-user.html
Then just add the right user after.
Hi jon,
Thanks for your advice and link.
Tried follows. Non of them works;
mysql> DROP USER maluser@localhost;
ERROR 1396 (HY000): Operation DROP USER failed for 'maluser'@'localhost'
mysql> DROP USER maluser;
ERROR 1396 (HY000): Operation DROP USER failed for 'maluser'@'%'
mysql> DROP USER 'maluser'@'localhost';
ERROR 1396 (HY000): Operation DROP USER failed for 'maluser'@'localhost'
mysql> DROP USER maluser;
ERROR 1396 (HY000): Operation DROP USER failed for 'maluser'@'%'
mysql> DROP USER maluser ;
ERROR 1396 (HY000): Operation DROP USER failed for 'maluser'@'%'
mysql> DROP USER 'maluser';
ERROR 1396 (HY000): Operation DROP USER failed for 'maluser'@'%'
mysql> DROP USER maluser@localhost ;
ERROR 1396 (HY000): Operation DROP USER failed for 'maluser'@'localhost'
mysql Ver 14.12 Distrib 5.0.51a,
satimis
falko
5th September 2008, 13:11
Try this:
use mysql;
update user set User = "mailuser" where User = "maluser";
flush privileges;
satimis
5th September 2008, 18:27
Try this:
use mysql;
update user set User = "mailuser" where User = "maluser";
flush privileges;
Hi falko,
I got it. My problem fixed now. Thanks.
A side question;
If on typing;
mysql > line 1
> line 2
> line 3
> line 4
etc.
Suddenly I found there is a typing mistake on line 2. How can I jump back to line 2 making correction? Thanks.
B.R.
satimis
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.