473,467 Members | 1,680 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Can't get rid of GRANT entry

I'm running MySQL 4.0 on SuSE Linux 7.3 Pro. I accidentally granted
priveledges to a user with the following user label, quotes are part of the
user label:

// NOTE: replace [at] with @, this was done to keep the mail client from
turning it into a "mailto:" link.

"someuser[at]180.150.2.%"

I did this by enclosing the entire user label in quotes rather that just the
ip
address portion of the user label. That is, it should have been:

someuser[at]"180.150.2.%"

When I do a mysqldump I see a user table entry as follow:

INSERT INTO user VALUES('%', 'someuser[at]180.150.2.%',.....

No matter what syntax I use for REVOKE, I can't get rid of this entry:

What can I do?

thx
--

Robert Oschler
"Let the web hear you, add your voice to your web site in minutes!"
-- http://audiodirect.spiderchase.com/
(For a limited time, free voiceover with every sign-up, use this link
instead)
-- http://audio.spiderchase.com/

Jul 19 '05 #1
2 1870
Robert Oschler wrote:
I'm running MySQL 4.0 on SuSE Linux 7.3 Pro. I accidentally granted
priveledges to a user with the following user label, quotes are part of the
user label:

// NOTE: replace [at] with @, this was done to keep the mail client from
turning it into a "mailto:" link.

"someuser[at]180.150.2.%"

I did this by enclosing the entire user label in quotes rather that just the
ip
address portion of the user label. That is, it should have been:

someuser[at]"180.150.2.%"

When I do a mysqldump I see a user table entry as follow:

INSERT INTO user VALUES('%', 'someuser[at]180.150.2.%',.....

No matter what syntax I use for REVOKE, I can't get rid of this entry:

What can I do?

thx
--

Robert Oschler
"Let the web hear you, add your voice to your web site in minutes!"
-- http://audiodirect.spiderchase.com/
(For a limited time, free voiceover with every sign-up, use this link
instead)
-- http://audio.spiderchase.com/


I'm using Redhat 8.0 and MySQL 4.0.7-gamma-Max this is how I'd tackle
it.It may or maynot work for your version but it's worth a try. Take a
look at the user table
use mysql;
SELECT Host, User, Password
FROM user;

This should show you your users then *carefully* remove the spurious
user - try doing a select on the user first just to make sure your
`where` clause is correct.
SELECT Host, User, Password FROM user WHERE User=<your user in quotes>;

See what is actually entered into the table for that user - I added your
user and the field was truncated to 'someuser[at]180.' so I'm not sure
where the rest of your ip came from in the insert statement on the
backup. Doesn't matter just remove the entry with the unwanted user
....

DELETE FROM user WHERE User=<your user in quotes.>

...now flush privilegs.. always a good idea when messing with users & access

FLUSH PRIVILEGES;

....then...

SELECT Host, User, Password
FROM user;

again and see it's gone, hopefully.;)
lol

Chris

Jul 19 '05 #2
Robert Oschler wrote:
I'm running MySQL 4.0 on SuSE Linux 7.3 Pro. I accidentally granted
priveledges to a user with the following user label, quotes are part of the
user label:

// NOTE: replace [at] with @, this was done to keep the mail client from
turning it into a "mailto:" link.

"someuser[at]180.150.2.%"

I did this by enclosing the entire user label in quotes rather that just the
ip
address portion of the user label. That is, it should have been:

someuser[at]"180.150.2.%"

When I do a mysqldump I see a user table entry as follow:

INSERT INTO user VALUES('%', 'someuser[at]180.150.2.%',.....

No matter what syntax I use for REVOKE, I can't get rid of this entry:

What can I do?

thx
--

Robert Oschler
"Let the web hear you, add your voice to your web site in minutes!"
-- http://audiodirect.spiderchase.com/
(For a limited time, free voiceover with every sign-up, use this link
instead)
-- http://audio.spiderchase.com/


I'm using Redhat 8.0 and MySQL 4.0.7-gamma-Max this is how I'd tackle
it.It may or maynot work for your version but it's worth a try. Take a
look at the user table
use mysql;
SELECT Host, User, Password
FROM user;

This should show you your users then *carefully* remove the spurious
user - try doing a select on the user first just to make sure your
`where` clause is correct.
SELECT Host, User, Password FROM user WHERE User=<your user in quotes>;

See what is actually entered into the table for that user - I added your
user and the field was truncated to 'someuser[at]180.' so I'm not sure
where the rest of your ip came from in the insert statement on the
backup. Doesn't matter just remove the entry with the unwanted user
....

DELETE FROM user WHERE User=<your user in quotes.>

...now flush privilegs.. always a good idea when messing with users & access

FLUSH PRIVILEGES;

....then...

SELECT Host, User, Password
FROM user;

again and see it's gone, hopefully.;)
lol

Chris

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: | last post by:
I issued the mysql command Grant all on *.* to myid@localhost identified as "mypw"; and recieved the error message ERROR 1045: Access denied for user" '@localhost' (Using password: NO) I...
14
by: Martin v. Löwis | last post by:
The Python Software Foundation is seeking grant proposals for projects related to the further development of Python, Python-related technology, and educational resources. The PSF plans to issue...
4
by: Amardeep Verma | last post by:
Hi, I have a quick question. Which role/privileges are required before a user can give the statement "GRANT ALL PRIVILEGES"? Thanking you in Advance Have a nice day
2
by: willjay | last post by:
I am trying to access mysql on a remote server over the internet. The odbc driver says that root@myCurrentIPaddress.com does not have access to mysql. How do I grant access to root from a...
0
by: Mark Adams | last post by:
I really need some help with this. MySQL will not start on boot despite everything I've done to make sure that it is set to do so. When I start it as root from a terminal with...
2
by: Jimi Ffondu | last post by:
Hi there - it's pretty simple, and I'm an idiot. I'm not a developer, I just seem to have landed in this job building this Access database - I've got two days to make it work... aaahh! 1) ...
4
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is...
1
by: rahul | last post by:
since morning i am facing a problem on all db's on a server if i recreate a procedure and give grants to users ...it justs stop responding my last grant is now running for 1 hrs also its not...
7
by: MNNovice | last post by:
Please forgive me for this is a long request. I am designing a DB to capture expenses related to Federal Grants and to generate appropriate reports. Each grant starts with a Notice of Grant Award...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.