Question: I am trying to connect to a JDBC MySQL database using Java, but I am getting the following error when I try to run my program:-

> 
> No suitable driver found for
>  a9442ca6-992c-411b-8bda-a42f00a0ab2e.mysql.sequelizer.com
> 
> 
> 

I downloaded the following Jar file and added it to my project:

```
    mysql-connector-java5.1.34-bin.jar

```

I'm not sure if I need to add some kind of 'import' statement in my declaration maybes? Any help would be much appreciated.

My code is as follows:-

```
package dvddblibrary;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.ResultSet;
import javax.swing.JOptionPane;
import java.util.Scanner;

    public class DBConnect {

        /**
         * @param args the command line arguments
         */
        public static void main(String[] args) 
        {

            try
            {
                String host = "xxx";
                String uName = "xxx";
                String uPass = "xxx";

            Connection con = DriverManager.getConnection(host, uName,   uPass);

            }
            catch (SQLException err)
            {
                System.out.println(err.getMessage());
            }
        }

    }

```

Answer: 
Try this :

```
package dvddblibrary;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class DBConnect {
    public static void main(String[] args) {
        try {
            String host = "xxx";
            String uName = "xxx";
            String uPass = "xxx";
            Class.forName("com.mysql.jdbc.Driver");
            Connection con = DriverManager.getConnection(host, uName, uPass);
        } catch (SQLException err) {
            System.out.println(err.getMessage());
        }
    }
}

```
Download the file from [ <http://dev.mysql.com/downloads/connector/j/> ]. Extract it and you will find a .jar file inside the lib folder. Copy this file into the lib/ folder of your project.

It may cause that problem.