wood burning stoves 2.0*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30085
    
149

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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30085
    
149

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...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: creating a new user profile dynamically for mysql?
 
Similar Threads
How can we deal if Users are exceeded to connection pool size
How to access Secure web method
Weblogic datasource problem
JSP
how to create tablespace in java dbms