hi, I would like to talk to my MySql server on the local machine (4.0.15-nt) by giving the userid and password from the java program. As of now I am able to connect to the Mysql server by using only the url in the code Connection conn = DriverManager.getConnection(url). I want to give the userid and password. Kindly let me know. PS: I connect to the MySql server by..... C:\mysql\bin\mysql I dont give the userid and password, How do I go about doing this, help would be appreciated
thanks nash
Dirk Schreckmann
Sheriff
Joined: Dec 10, 2001
Posts: 7023
posted
0
I would like to talk to my MySql server on the local machine (4.0.15-nt) by giving the userid and password from the java program. Take a look at the DriverManager class documentation. Notice that the getConnection method is overloaded. One version takes a url, a user, and a password (all as Strings). I connect to the MySql server by..... C:\mysql\bin\mysql I dont give the userid and password, How do I go about doing this, Are you asking how to secure a database in MySQL?
hi, I want to know how to go about doing a secure connection to a database server (MySql 4.0.15-nt),that is provide a username and password so that I could connect to it. Let me know Thanking you nash