Originally Posted by copeg
Ill explain a bit better. I have the mysql community server vs 5.1.51 running on my desktop pc at home. If im at university or somewhere else other than home i want this program to be able to connect to it, which it can. I log in as the root user as im the only one so i have all permissions etc. I just want to no how to 'securely' login i guess.
String url = addressTextField.getText();
String userName = getLoginDetails(loginTextField);//gets username
String passWord = getLoginDetails(passWordTextField);//gets pass
con = DriverManager.getConnection(url,userName, passWord);
stmt = con.createStatement();
conInfoTextArea.setText("URL: " + url + "\n" + "Connection: " + con);
public String getLoginDetails(JTextField tf)
return logindets = tf.getText();//string that holds login dets which is user/pass
Now that code there is just sending the username, and password to the url, which is the mysql server. How can i do this safely with encryption or some other method? or is that fine and secure as it is?