To connect to the database, you need to use a JDBC url with the following format
This is described in the Driver documentation. Accordingly, the piece of code you must use is:
} catch (ClassNotFoundException cnfe)
System.err.println("Error loading driver:"+cnfe);
Connection con = DriverManager.getConnection("jdbc:mysql://localhost/Authority?user=root&password=fox123");
Java Tips by : Karmegam
Do you have a Java Question?
Java Programming Hints and Tips
All the site contents are Copyright © www.erpgreat.com
and the content authors. All rights reserved.
All product names are trademarks of their respective companies.
The site www.erpgreat.com is not affiliated with or endorsed by any company listed at this site.
Every effort is made to ensure the content integrity. Information used on this site is at your own risk.
The content on this site may not be reproduced or redistributed without the express written permission of
www.erpgreat.com or the content authors.