wood burning stoves*
The moose likes JDBC and the fly likes creating a new user profile dynamically for mysql? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Bookmark "creating a new user profile dynamically for mysql?" Watch "creating a new user profile dynamically for mysql?" New topic
Author

creating a new user profile dynamically for mysql?

vineet dhar
Greenhorn

Joined: Aug 17, 2011
Posts: 23
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

Joined: May 26, 2003
Posts: 30584
    
154

JDBC isn't meant for database admin. Maybe you could use Runtime.exec and execute the command line to add a user?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
vineet dhar
Greenhorn

Joined: Aug 17, 2011
Posts: 23
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

Joined: May 26, 2003
Posts: 30584
    
154

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

Joined: Aug 17, 2011
Posts: 23
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...
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: creating a new user profile dynamically for mysql?