Bug #33512 Information
Submitted: 26 Dec 2007 9:20 Modified: 26 Apr 2013 7:57
Reporter: Rajesh RamiReddy Email Updates:
Status: Can't repeat Impact on me:
None 
Category:Connector / J Severity:S5 (Performance)
Version:MySql 5.0 OS:Windows (xp service pack 2)
Assigned to: Alexander Soklakov CPU Architecture:Any

[26 Dec 2007 9:20] Rajesh RamiReddy
Description:
I was wrote a programme in JDBC using MySql 5.0
The Mysql Connection is not established while running my programm.

My programm is 

import java.sql.*;
public class JdbcConn 
{
 public static void main(String[] args)
  {
     Connection conn = null;
             try
             {
                 String url = "jdbc:mysql://localhost:3306/test";
                 Class.forName ("com.mysql.jdbc.Driver").newInstance ();
                 conn = DriverManager.getConnection (url,"admin" ,"admin");
                 System.out.println ("Database connection established");
             }
             catch (Exception e)
             {
                 System.err.println (e);
             }
             
         }
     }
 
Note:
1. Here MySql UserName and Password both are "admin"
2. My port number is 3306.
3. My Database name is test.

4. If you know fill the comment regarding this. and give the procedure for creating the connections and place the jar files.

How to repeat:
Bug is 

java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at Jdbc11.main(Jdbc11.java:10)
[26 Dec 2007 9:53] Valeriy Kravchuk
Thank you for a problem report. Please, specify the exact version of MySQL Connector/J used.

Can you connect to that server using mysql command line client?
[27 Jan 2008 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[26 Apr 2013 7:57] Alexander Soklakov
There is no feedback since Dec 2007 so I close this report as "Can't
repeat".
Please, feel free to reopen it if the problem still exists and you can
provide more info to analyze.