cleanup mysql

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Vegan
Forum Regular
Posts: 574
Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:

cleanup mysql

Post by Vegan »

generally mysql is not a big problem

but i have one user account that is messy

it is in quotes while the rest are normal

any suggestions how to get rid of it?
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: cleanup mysql

Post by requinix »

Quotes?
User avatar
Vegan
Forum Regular
Posts: 574
Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:

Re: cleanup mysql

Post by Vegan »

Code: Select all

mysql> SELECT User FROM mysql.user;
+-----------------------+
| User                  |
+-----------------------+
| azureguru             |
| globalecon            |
| hardcorecomputerchess |
| hardcoregames         |
| hardcoregamesredirect |
| hivresearch           |
| linuxguru             |
| veganadvocate         |
| windowsguru           |
| debian-sys-maint      |
| mysql.sys             |
| root                  |
| ‘linuxguru’           |
+-----------------------+
13 rows in set (0.28 sec)
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: cleanup mysql

Post by requinix »

You already have a "linuxguru" user. Want to drop the other one? The username and host are strings, not identifiers, so you'd use ' or " to quote them.

Code: Select all

DROP USER '`linuxguru`'@'whatever';
User avatar
Vegan
Forum Regular
Posts: 574
Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:

Re: cleanup mysql

Post by Vegan »

requinix wrote:You already have a "linuxguru" user. Want to drop the other one? The username and host are strings, not identifiers, so you'd use ' or " to quote them.

Code: Select all

DROP USER '`linuxguru`'@'whatever';
I have tried that it does not work

DROP USER '`linuxguru`'@'%';

operator drop user failed
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: cleanup mysql

Post by requinix »

Do you have the permissions for it?
User avatar
Vegan
Forum Regular
Posts: 574
Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:

Re: cleanup mysql

Post by Vegan »

I am using the root account
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: cleanup mysql

Post by requinix »

Then what was the exact error message?
Post Reply