I've written a class which fetcheS data from the databasE:
@Test
    void ts() throws ClassNotFoundException, SQLException{
    Class.forName("com.mysql.jdbc.Driver");
    Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/selenium","root","root");
    Statement stm=con.createStatement();
    ResultSet rs=stm.executeQuery("select * from seleniumusers");
    while(rs.next()){
         name=rs.getString("firstname");
        System.out.println(name);
        e(mysql)
But on running the test from testng once the browser gets open it gives and error:
Warning: mysql_pconnect() [function.mysql-pconnect]: Can't connect to MySQL server on 'localhost' (10061) in C:\Program Files\vtigercrm-5.2.1\apache\htdocs\vtigerCRM\adodb\drivers\adodb-mysql.inc.php on line 373
 
     
    