MySQL DROP USER not working

Wouter

Verified User
Joined
Jun 15, 2005
Messages
132
Location
The Netherlands
Since I have upgraded to phpMyAdmin-2.7.0-pl1 I can't drop a user using phpMyAdmin. This is because phpMyAdmin-2.70-pl1 is using a other method then phpMyAdmin-2.6.4-pl4.

New method:
Code:
DROP USER 'hfh'@ 'localhost';



MySQL retourneerde:  

#1268 - Can't drop one or more of the requested users

Old method:

Code:
DELETE FROM `user` WHERE CONVERT( User USING utf8 ) = CONVERT( 'hfh' USING utf8 ) AND CONVERT( Host USING utf8 ) = CONVERT( 'localhost' USING utf8 ) ;

DELETE FROM `db` WHERE CONVERT( User USING utf8 ) = CONVERT( 'hfh' USING utf8 ) AND CONVERT( Host USING utf8 ) = CONVERT( 'localhost' USING utf8 ) ;

DELETE FROM `tables_priv` WHERE CONVERT( User USING utf8 ) = CONVERT( 'hfh' USING utf8 ) AND CONVERT( Host USING utf8 ) = CONVERT( 'localhost' USING utf8 ) ;

DELETE FROM `columns_priv` WHERE CONVERT( User USING utf8 ) = CONVERT( 'hfh' USING utf8 ) AND CONVERT( Host USING utf8 ) = CONVERT( 'localhost' USING utf8 ) ;

MySQL version: 4.1.16.
PHP version: 4.4.1

If I use DROP USER on command line this is also not working.

Does someone know how I can solve this?
 
Last edited:
have the same story. are you running gentoo by any chance?

mysql 4.1.14
php 4.4.0
phpmyadmin 2.7.0.p1
 
found the solution, at least for the command line -> looks to me as phpmyadmin should not be using this new method as it is not "fully implemented" in mysql4, only in newest builds of mysql5. solution: look in the mysql4 manual on their website for the description of following commands: revoke,grant,drop user.
 
Back
Top