@Jigar is correct, if not terse. But it looks like you might need more info, and I'm going to spoonfeed it to you.
Firstly, you shouldn't be trying to format a date to suit mysql. You should be passing a Date as a parameter to your sql query (not building up a String of sql).
To parse the date from your input, try code like this:
public static void main(String[] args) throws Exception {
String input = "01-Jul-2011 12:52:00";
SimpleDateFormat format = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss");
Date date = format.parse(input);
System.out.println(date); // "Fri Jul 01 12:52:00 EST 2011"
}
Here's an example of how you make sql calls using a JDBC connector passing parameters:
Date date = format.parse(input);
jdbcConnection.createStatement().execute("insert into mytable (id, some_date) values (?, ?)", new Object[]{1, date});
You don't need to worry about how to format the date for mysql - let the JDBC driver do that for you.