JDBC to Mysql connectivity issue
i have downloaded jdbc driver for mysql. and also installed mysql.
i can login to mysql normally through commandline but when i run my application it cannot connect to database.
the name of database i want to use is OS. user id is Vikram and password is viki.
the code i am running is
import java.sql.*;
public class DBCon{
private static Connection Db;
public static void main(String[] args) throws
{
String url="jdbc:
String userID="vikram";
String password="viki";
Class.
Db=DriverMana
}
}
the program runs till Class.forName... but when getConnection is called an exception occurs... the error is:
Exception in thread "main" com.mysql.
at com.mysql.
at com.mysql.
at com.mysql.
at com.mysql.
at com.mysql.
at com.mysql.
at com.mysql.
at com.mysql.
at com.mysql.
at com.mysql.
at com.mysql.
at com.mysql.
at com.mysql.
at java.sql.
at java.sql.
at DBCon.main(
i have no way outta this.!
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Viki for more information if necessary.