Re: Unable To Remove User
On Wed, Sep 30, 2009 at 8:18 AM, Claudio Nanni wrote: > Remove manually (delete) the user from all the privilege tables: > > delete from columns_priv where user='carlos'; > delete from db where user='carlos'; > delete from procs_priv where user='carlos'; > delete from tables_priv where user='carlos'; > delete from user where user='carlos'; > > then a nice FLUSH PRIVILEGES; > > this should fix, let me know! Worked great!!! mysql> select User, Host, Password from user; +--+---+---+ | User | Host | Password | +--+---+---+ | root | localhost | *FDCCC9BE5FC366E7D9714988DBC7F111A950C428 | +--+---+---+ 1 row in set (0.00 sec) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
RE: Unable To Remove User
hi Carloswil, could you do below check: 1. show processlists; // is there any session logined by this user account? 2. select CURRENT_USER() ; // ensure you are logining with r...@localhost, not the r...@% best regards liuyann > Date: Wed, 30 Sep 2009 09:37:28 -0400 > Subject: Re: Unable To Remove User > From: carlosw...@gmail.com > To: mysql@lists.mysql.com > > On Wed, Sep 30, 2009 at 9:12 AM, Martin Gainty wrote: > > Grant > > > > he is trying to login as that user > > then drop the user he logged in as > > No, no and no. I clearly showed my commands including my login to > MySQL as root. I also cleanly noted I can't even login as the user I > am trying to delete. > > I will try Claudio's suggestion and post back my results. I find it > odd that the output of users has a carriage return in it which > malformed the table output. It's not normally like that so you're > possibly right and that could be the issue! Either way I hope > Claudio's instructions resolve it. > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/mysql?unsub=liuy...@live.com > _ Show them the way! Add maps and directions to your party invites. http://www.microsoft.com/windows/windowslive/products/events.aspx
Re: Unable To Remove User
On Wed, Sep 30, 2009 at 9:12 AM, Martin Gainty wrote: > Grant > > he is trying to login as that user > then drop the user he logged in as No, no and no. I clearly showed my commands including my login to MySQL as root. I also cleanly noted I can't even login as the user I am trying to delete. I will try Claudio's suggestion and post back my results. I find it odd that the output of users has a carriage return in it which malformed the table output. It's not normally like that so you're possibly right and that could be the issue! Either way I hope Claudio's instructions resolve it. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
RE: Unable To Remove User
Grant he is trying to login as that user then drop the user he logged in as Martin Gainty __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Wed, 30 Sep 2009 22:39:50 +1000 > From: gxal...@gmail.com > To: carlosw...@gmail.com > CC: mysql@lists.mysql.com > Subject: Re: Unable To Remove User > > Carlos Williams wrote: > > On Tue, Sep 29, 2009 at 11:36 PM, mos wrote: > >> Why don't you just say "Drop User carlos"? > >> Also are you logged in as root? > > > > In my original message to the board I demonstrated the error I get on > > my server when I attempt to run the 'drop user 'carlos'@'localhost'; > > command. Why can't I remove this user from MySQL? > > [ snip ] > > > Database changed > > mysql> select User, Host from user; > > +++ > > | User | Host | > > +++ > > | carlos | localhost > > | > > | root | localhost | > > +++ > > 2 rows in set (0.00 sec) > > > Carlos, is this output exactly as it appeared when you ran the command? > Specifically, that extra carriage return after localhost for the user carlos? > I wonder if the host value is actually localhost followed by a carriage > return, which is why it isn't found when you try to drop the user using the > 'carlos'@'localhost' value. Try this select statement to confirm: > > select user, host from user where host = 'localhost'; > > If you don't see carlos returned as a user, this is potentially the problem. > If that's the case, use Claudio's suggestion to remove the user manually. > > Ciao > Fuzzy > :-) > > > Dazed and confused about technology for 20 years > http://fuzzydata.wordpress.com/ > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe:http://lists.mysql.com/mysql?unsub=mgai...@hotmail.com > _ Insert movie times and more without leaving Hotmail®. http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009
RE: Unable To Remove User
What version of mysql a you using? Drop user works differently for versions before 5.0.2. You could just remove the user from the mysql.user table with a delete statement. Regards John Daisley Mobile +44(0)7812 451238 Email j...@butterflysystems.co.uk Certified MySQL 5 Database Administrator (CMDBA) Certified MySQL 5 Developer Cognos BI Developer --- Sent from HP IPAQ mobile device. -Original Message- From: Carlos Williams Sent: Wednesday, September 30, 2009 12:47 PM To: mysql@lists.mysql.com Subject: Re: Unable To Remove User On Tue, Sep 29, 2009 at 11:36 PM, mos wrote: > Why don't you just say "Drop User carlos"? > Also are you logged in as root? In my original message to the board I demonstrated the error I get on my server when I attempt to run the 'drop user 'carlos'@'localhost'; command. Why can't I remove this user from MySQL? I am logged in as root on both Linux and MySQL so I don't see why I can't remove 'carlos'@'localhost'. It's as if MySQL doesn't understand this user exist. He might not exist because I can't login as him however I need this entry removed from the "user" table. [r...@tiger ~]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 9 Server version: 5.1.38 Source distribution mysql> show grants for 'carlos'@'localhost'; ERROR 1141 (42000): There is no such grant defined for user 'carlos' on host 'localhost' mysql> use mysql; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed [The entire original message is not included] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Unable To Remove User
Carlos Williams wrote: On Tue, Sep 29, 2009 at 11:36 PM, mos wrote: Why don't you just say "Drop User carlos"? Also are you logged in as root? In my original message to the board I demonstrated the error I get on my server when I attempt to run the 'drop user 'carlos'@'localhost'; command. Why can't I remove this user from MySQL? [ snip ] Database changed mysql> select User, Host from user; +++ | User | Host | +++ | carlos | localhost | | root | localhost | +++ 2 rows in set (0.00 sec) Carlos, is this output exactly as it appeared when you ran the command? Specifically, that extra carriage return after localhost for the user carlos? I wonder if the host value is actually localhost followed by a carriage return, which is why it isn't found when you try to drop the user using the 'carlos'@'localhost' value. Try this select statement to confirm: select user, host from user where host = 'localhost'; If you don't see carlos returned as a user, this is potentially the problem. If that's the case, use Claudio's suggestion to remove the user manually. Ciao Fuzzy :-) Dazed and confused about technology for 20 years http://fuzzydata.wordpress.com/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Unable To Remove User
Remove manually (delete) the user from all the privilege tables: delete from columns_priv where user='carlos'; delete from db where user='carlos'; delete from procs_priv where user='carlos'; delete from tables_priv where user='carlos'; delete from user where user='carlos'; then a nice FLUSH PRIVILEGES; this should fix, let me know! Claudio 2009/9/30 Carlos Williams > On Tue, Sep 29, 2009 at 11:36 PM, mos wrote: > > Why don't you just say "Drop User carlos"? > > Also are you logged in as root? > > In my original message to the board I demonstrated the error I get on > my server when I attempt to run the 'drop user 'carlos'@'localhost'; > command. Why can't I remove this user from MySQL? I am logged in as > root on both Linux and MySQL so I don't see why I can't remove > 'carlos'@'localhost'. It's as if MySQL doesn't understand this user > exist. He might not exist because I can't login as him however I need > this entry removed from the "user" table. > > [r...@tiger ~]# mysql -u root -p > Enter password: > Welcome to the MySQL monitor. Commands end with ; or \g. > Your MySQL connection id is 9 > Server version: 5.1.38 Source distribution > > mysql> show grants for 'carlos'@'localhost'; > ERROR 1141 (42000): There is no such grant defined for user 'carlos' > on host 'localhost' > mysql> use mysql; > Reading table information for completion of table and column names > You can turn off this feature to get a quicker startup with -A > > Database changed > mysql> select User, Host from user; > +++ > | User | Host | > +++ > | carlos | localhost > | > | root | localhost | > +++ > 2 rows in set (0.00 sec) > > mysql> drop user 'carlos'@'localhost'; > ERROR 1396 (HY000): Operation DROP USER failed for 'carlos'@'localhost' > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: > http://lists.mysql.com/mysql?unsub=claudio.na...@gmail.com > > -- Claudio
Re: Unable To Remove User
On Tue, Sep 29, 2009 at 11:36 PM, mos wrote: > Why don't you just say "Drop User carlos"? > Also are you logged in as root? In my original message to the board I demonstrated the error I get on my server when I attempt to run the 'drop user 'carlos'@'localhost'; command. Why can't I remove this user from MySQL? I am logged in as root on both Linux and MySQL so I don't see why I can't remove 'carlos'@'localhost'. It's as if MySQL doesn't understand this user exist. He might not exist because I can't login as him however I need this entry removed from the "user" table. [r...@tiger ~]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 9 Server version: 5.1.38 Source distribution mysql> show grants for 'carlos'@'localhost'; ERROR 1141 (42000): There is no such grant defined for user 'carlos' on host 'localhost' mysql> use mysql; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> select User, Host from user; +++ | User | Host | +++ | carlos | localhost | | root | localhost | +++ 2 rows in set (0.00 sec) mysql> drop user 'carlos'@'localhost'; ERROR 1396 (HY000): Operation DROP USER failed for 'carlos'@'localhost' -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Unable To Remove User
At 06:35 PM 9/29/2009, Carlos Williams wrote: I just created a generic test user account on MySQL 5.1 and now for some reason I am unable to remove him... mysql> use mysql; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> select User, Host from user; +++ | User | Host | +++ | carlos | localhost | | root | localhost | +++ 2 rows in set (0.01 sec) I obviously from above have a user name 'carlos'@'localhost' & when I try to delete him, I get the following: mysql> drop user 'carlos'@'localhost'; ERROR 1396 (HY000): Operation DROP USER failed for 'carlos'@'localhost' Can someone please help me understand why I am unable to remove this user from MySQL? Why don't you just say "Drop User carlos"? Also are you logged in as root? Mike -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=mo...@fastmail.fm -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Unable To Remove User
I just created a generic test user account on MySQL 5.1 and now for some reason I am unable to remove him... mysql> use mysql; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> select User, Host from user; +++ | User | Host | +++ | carlos | localhost | | root | localhost | +++ 2 rows in set (0.01 sec) I obviously from above have a user name 'carlos'@'localhost' & when I try to delete him, I get the following: mysql> drop user 'carlos'@'localhost'; ERROR 1396 (HY000): Operation DROP USER failed for 'carlos'@'localhost' Can someone please help me understand why I am unable to remove this user from MySQL? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org