If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Problem with user name

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-02-09, 00:50
ankur02018 ankur02018 is offline
Registered User
 
Join Date: Jun 2007
Posts: 189
Smile Problem with user name

Hi,
I have created a new user and grant only for one database

grant all privileges on A.* to a@localhost identified by 'a'

but after some time when i login with this user

and do show databases;

it show all databases on this server

when i do flush privileges commad now this user work fine show only one particular database

but after while when I login from this user all databases shows

how can counter this problem ??
Reply With Quote
  #2 (permalink)  
Old 04-02-09, 01:50
healdem healdem is online now
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,260
grant privilieges on the required databases
MySQL :: MySQL 5.1 Reference Manual :: 12.5.1.3 GRANT Syntax

eg
grant all privileges on *.mydatabasename to auser@anipaddressOrhostname identified by 'apassword'

however I've alwasy found the grant procedure to be a bit of a pain, so tend to do it these days using MySQL Administrator GUI tool, available fromt eh MySQL website as part of the GUI Tools
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #3 (permalink)  
Old 04-02-09, 04:30
ankur02018 ankur02018 is offline
Registered User
 
Join Date: Jun 2007
Posts: 189
Quote:
Originally Posted by healdem
grant privilieges on the required databases
MySQL :: MySQL 5.1 Reference Manual :: 12.5.1.3 GRANT Syntax

eg
grant all privileges on *.mydatabasename to auser@anipaddressOrhostname identified by 'apassword'
I have done the grant only for one database

grant all privileges on A.* to a@localhost identified by 'a'

where A is database

but still after some time with user "a" you can access all databases
untill you do flush privileges command

the same process repeats
Reply With Quote
  #4 (permalink)  
Old 04-08-09, 03:44
ankur02018 ankur02018 is offline
Registered User
 
Join Date: Jun 2007
Posts: 189
Quote:
Originally Posted by ankur02018
I have done the grant only for one database

grant all privileges on A.* to a@localhost identified by 'a'

where A is database

but still after some time with user "a" you can access all databases
untill you do flush privileges command

the same process repeats
Problem is solved I start mysql in safe mode once
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On