I have created a MySQL database. I am building a GUI in java. How can I connect this Java software to the database?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
First, you need to add the mysql jdbc driver jar to your project, then you would create a connection as follows:
Here yourhost is the name or ip address of the server, port is the port number to which the mysql server is bound, dbname is the name of your database.