can't connect to MySQL Server(10060)

Ads
 

can't connect to MySQL Server(10060)

View Answers

August 1, 2008 at 4:22 PM

Hi friend,


This is login action code.


<%@ page language="java" import="java.sql.*" import="java.util.*" %>

<%
Connection con = null;
String url = "jdbc:mysql://192.168.10.211:3306/";;
String db = "amar";
String driver = "com.mysql.jdbc.Driver";
String userName ="amar";
String password="amar123";
try{
Class.forName(driver);
con = DriverManager.getConnection(url+db,userName,password);
try{
Statement st = con.createStatement();
String user=request.getParameter("userid");
String pass=request.getParameter("password");
ResultSet rs=st.executeQuery("select userid,password from login");
while(rs.next()) {
String userid =rs.getString(1);
String passw=rs.getString(2);
if(user.equals(userid) && pass.equals(passw)) {
session.setAttribute("user",user);

%>
<jsp:forward page="LoginSuccess.jsp" />

<%}
else
out.println("Login Failed,Please try Againe");
%>

<%
}
}catch(Exception e1){}
}
catch (Exception e){
e.printStackTrace();
}

%>


---------------------------------------------------

Read for more information.

http://www.roseindia.net/jdbc/

Thanks.

Ads









Related Tutorials/Questions & Answers:
mysql error 1042 can't get hostname for your address
mysql error 1042 can't get hostname for your address  Hi, I am not able to connect to MySQL database. Its giving following error: mysql error 1042...; Hi, Find my.ini file of your MySQL Server and then add the following line
Mysql connect
Mysql connect  i can have a mysql database file and mysql-connector-net .but i have not mysql database. how to connect vb.net thsis database.(C:\Documents and Settings\Admin\My Documents\VB.NET\Stock delna\STC.sql ). plz help me
Advertisements
mysql_connect arguments
mysql_connect arguments   How many arguments a mysql_connection function required to connect to the database?   ?mysql_connect? function takes three arguments Server - localhost Username - admin Password - 1admin
How to connect mysql with jsp
How to connect mysql with jsp  how to connect jsp with mysql while using apache tomcat
How to connect to MySQL in JSP?
How to connect to MySQL in JSP?  How to connect to MySQL in JSP..., You can use the Java JDBC code to connect to MySQL database in JSP page. Check the tutorial: Connect JSP with mysql Thanks
Java Connect to and FTP Server
the apache commons library to connect/login to FTP server. Link of complete example is FTP Server : Connect and Login. Thanks...Java Connect to and FTP Server  What is the code for Java Connect
ModuleNotFoundError: No module named 'connect-mysql'
ModuleNotFoundError: No module named 'connect-mysql'  Hi, My... 'connect-mysql' How to remove the ModuleNotFoundError: No module named 'connect-mysql' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'connect-mysql'
ModuleNotFoundError: No module named 'connect-mysql'  Hi, My... 'connect-mysql' How to remove the ModuleNotFoundError: No module named 'connect-mysql' error? Thanks   Hi, In your python
not able to connect to mysql using.. jdbc
not able to connect to mysql using.. jdbc   i am not able to connect to mysql using jdbc .. is there any classpath that i need to set..because i am using mysql-connector-java jar file..to connect to mysql.. Pls provide the steps
Connecting to remote mysql server using jdbc.
Connecting to remote mysql server using jdbc.  How to Connect to remote mysql server using jdbc
upgrade mysql cpanel server
upgrade mysql cpanel server  upgrade mysql cpanel server
FTP Server : Connect and Login
In this tutorial we will discuss how to connect and login in FTP server with java programming
how to connect to database in php using mysql
how to connect to database in php using mysql  how to connect to database in php using mysql
error call to undefined function mysql_connect
error call to undefined function mysql_connect  what is error call to undefined function mysql_connect
how to connect client to server using Sockets
how to connect client to server using Sockets  how to connect client to server using Sockets
connect sql server 2005 using php
connect sql server 2005 using php  how to connect sql server 2005 using php program. how mssql_connect will work
how to connect SQL Server 2005 using php
how to connect SQL Server 2005 using php  i need to connect SQL Server 2005 using php. how can i connect . how to use mssql_connect function
how to connect mySql drivers into eclipse(configuration)?
how to connect mySql drivers into eclipse(configuration)?  how to connect mySql drivers into eclipse(configuration)? I need the configuration in eclipse. what do i have to download from mySql and just downloading is enough or do
ModuleNotFoundError: No module named 'egenix-mxodbc-connect-server'
ModuleNotFoundError: No module named 'egenix-mxodbc-connect-server'  ...: No module named 'egenix-mxodbc-connect-server' How to remove the ModuleNotFoundError: No module named 'egenix-mxodbc-connect-server' error
ModuleNotFoundError: No module named 'egenix-mxodbc-connect-server'
ModuleNotFoundError: No module named 'egenix-mxodbc-connect-server'  ...: No module named 'egenix-mxodbc-connect-server' How to remove the ModuleNotFoundError: No module named 'egenix-mxodbc-connect-server' error
ModuleNotFoundError: No module named 'egenix-mxodbc-connect-server'
ModuleNotFoundError: No module named 'egenix-mxodbc-connect-server'  ...: No module named 'egenix-mxodbc-connect-server' How to remove the ModuleNotFoundError: No module named 'egenix-mxodbc-connect-server' error
How to connect to MySQL from command prompt?
How to connect to MySQL from command prompt? This video tutorial walks you through the steps to connect to MySQL from command prompt in Windows machine... is installed with the MySQL server installation and it can be accessed by going
how to connect jsp to mysql - Java Beginners
how to connect jsp to mysql  I m new in Mysql and JSP i m ceating.java file using bean file for connectivity but i m not able to connect jsp... me hw to conncet jsp with mysql this is connection file package connect
MySQL server has gone away
MySQL server has gone away  Hi, What is the reason of error "MySQL server has gone away"? Some time in my application this error is coming. Thanks   hi friend, This happens because the server is timed out
MySQL server PID file could not be found! [FAILED]
MySQL server PID file could not be found! [FAILED]  MySQL server PID file could not be found! [FAILED
PHP MySQL Connect to a Database
it with so much ease. To connect with mysql server we can use two ways one... PHP MySQL Connect to a Database:      ... with MySQL server. Following piece of code will help you to check whether your PHP
why this can't
why this can't  import java.util.*; class Dash{ public static void main(String args[]){ int x0=100; int[] x1=new int[3]; int[][] x2=new int[3][3]; int[][][] x3=new int[3][3][3
JDBC Connection code to connect servlet with SQL Server 2008
JDBC Connection code to connect servlet with SQL Server 2008  Please ans me why it is not connect i use netbeans IDE7.0 Jdk 1.7 i also add sqljdbc4.jar but the output is SEVERE: Java Runtime Environment (JRE) version 1.6
JSP - MySQL - Connection
JSP - MySQL - Connection  I can't connect mysql using jsp in my... from the server was 1,300,257,595,704 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago. """" Can you help me
ModuleNotFoundError: No module named 'mysql-server-has-gone-away'
ModuleNotFoundError: No module named 'mysql-server-has-gone-away'  Hi...: No module named 'mysql-server-has-gone-away' How to remove the ModuleNotFoundError: No module named 'mysql-server-has-gone-away' error? Thanks
ModuleNotFoundError: No module named 'mysql-server-has-gone-away'
ModuleNotFoundError: No module named 'mysql-server-has-gone-away'  Hi...: No module named 'mysql-server-has-gone-away' How to remove the ModuleNotFoundError: No module named 'mysql-server-has-gone-away' error? Thanks

Ads