• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

creating a new user profile dynamically for mysql?

 
vineet dhar
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created a database (say A). Now i want to create a new privileged user which can access the database using a given form...i.e. after the new user fills in his details...he should be given a complete access to all the data in the database..like inserting, updating all...how to do that in java implementation...I know how to create a new database..but how to create a new user on that database..??
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34965
377
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JDBC isn't meant for database admin. Maybe you could use Runtime.exec and execute the command line to add a user?
 
vineet dhar
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky wrote:JDBC isn't meant for database admin. Maybe you could use Runtime.exec and execute the command line to add a user?



can you please elaborate a bit further on how to implement it??? thanks a lot...
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34965
377
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See the runtime.exec article. You just have to know how to add a user from the command line for this to work.
 
vineet dhar
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky wrote:See the runtime.exec article. You just have to know how to add a user from the command line for this to work.



thanks a lot for that...i tried doing it my conventional jdbc methods and i was able to create a new user...However for that user to be active I had to go through the command line...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic