MySQL  database? Plz help.

Hi all
          I am doing a project in p2p video conferencing.So to maintain all the user details can I use MySQL database. Is there any other appropriate databases?
            Plz help me with any tutorials if any one knows.
Advance thanx

Yes,
You can use any database and backend. All you need for video chatting is to exchange identities using a webservice that spits out xml.
Download the sample application
http://labs.adobe.com/technologies/stratus/samples/#resources
In it you will find a python cgi script. The script is self explanatory on how to configure a web service. It uses SQLite but you can use mysql or any other database.

Similar Messages

  • I have install wamp server one my first laptop and and i access data with my second laptop. i have connected both pc's with internet wire but it show some error"enable to connect mysql server " plz help me

    string wire = " Persist Security Info=False; server=xain; port=3307; database=test;username=root;password=";
    string query = "insert into test.server_base values('" + textBox1.Text + "', '" + textBox2.Text + "')";
    MySqlConnection condatabase = new MySqlConnection(wire);
    MySqlCommand cmd = new MySqlCommand(query, condatabase);
    MySqlDataReader myreader;
    try
    condatabase.Open();
    myreader = cmd.ExecuteReader();
    MessageBox.Show("Good");
    condatabase.Close();
    catch (Exception xe)
    MessageBox.Show(xe.Message,"na g na");
    /*server=xain is a server name assing in which database is install */

    Hi sohail.
    As you title mentioned wamp server, for WampServer is a Windows web development environment. It allows you to create web applications with Apache2, PHP and a MySQL database. This is third-party software. I
    am afraid this is out of our support.  I would suggest you to ask in their
    official forum. Thanks for your understanding.
    Have a nice day!
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • BO Mysql Database login help

    We have BOXI 3.0 (testing) installed in solaris sunOS 5.10, with the tomcat and mysql that comes with it. I am trying to login mysql but i am not being able. Is there any special trick to do that.
    I am able to use the  mysqlshutdown.sh and  mysqlstartup.sh to start and stop mysql. when I do ./mysqlshutdown it asks for password and that works.
    This is what I get:
    busobj@business2$ mysql -h 10.10.2.105 -p 3308
    Enter password:
    ERROR 1045: Access denied for user 'busobj'@'business2' (using password: YES)

    Typically this error message might happen if you are trying to connect to the MySQL server remotely, in which case you will have to grant your remote system connectivity rights to the mysql database.
    Here is a post from the vendor on what might be causing your issue:
    http://dev.mysql.com/doc/refman/4.1/en/access-denied.html

  • Dblink from Oracle to Mysql error PLZ HELP!!!

    Hi All,
    I am getting the following error when i am creating a databaselink to connect from oracle 10g to mysql 5.1.
    SQL> select * from ahmed_table@ahmedmysql3;
    select * from ahmed_table@ahmedmysql3
    ERROR at line 1:
    ORA-28545: error diagnosed by Net8 when connecting to an agent
    Unable to retrieve text of NETWORK/NCR message 65535
    ORA-02063: preceding 2 lines from AHMEDMYSQL3My ODBC database source name is ahmedmysql
    created file initahmedmysql.ora in hs/admin contents of which are
    HS_FDS_CONNECT_INFO = ahmedmysql
    HS_FDS_TRACE_LEVEL = offListener.ora contents
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = orcl)
          (ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
          (PROGRAM = extproc)
    hmedmysql =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = rc-6799)(PORT = 1521))
    (SID_NAME = ahmedmysql)
          (ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
          (PROGRAM = hsodbc)
      )Tnsnames.ora
    ahmedmysql = (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST = RC-6799)(PORT = 1521)) (CONNECT_DATA = (SID = ahmedmysql)) (HS = OK))I have searched on this site no one seems to have had found a solution!
    Is this a bug or am i missing something in the configuration,
    appreciate your help,
    regards,

    28545, 0000, "error diagnosed by Net8 when connecting to an agent"
    // *Cause:   An attempt to call an external procedure or to issue SQL
    //           to a non-Oracle system on a Heterogeneous Services database link
    //           failed at connection initialization.  The error diagnosed
    //           by Net8 NCR software is reported separately.
    // *Action:  Refer to the Net8 NCRO error message.  If this isn't clear,
    //           check connection administrative setup in tnsnames.ora
    //           and listener.ora for the service associated with the
    //           Heterogeneous Services database link being used, or with
    //           'extproc_connection_data' for an external procedure call.

  • How to process option value to database, plz help me out

    hi guys,
    can any one help me out in passing the option value to database.
    i have a 4 options, when any option selected, that should be processed to the database
    <form name="createfrm">
    <select name="select">
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    <option value="4">4</option>
    </select>
    plz., can any one help me out by giving me the javascript code

    here's the part of the code:
    In th javascript this is the one that populates the array gender[].
    gender1[] array is where i put the values from the database so it is part of the jsp code. You will store what you fetch in gender1[] array.
    Then you store it in another array in javascript using the follwing codes:
    var gender = new Array(
    <%
    out.println("\""+gender1[0]+"\"");
    for(int ip = 1; ip < 3; ip++) {out.println(", \"" + gender1[ip] + "\"");}
    %>
    Now for populating the values of the dropdown list You will use the following codes:
    function fillGenCivil(){
    for (var jj=0; jj<3; jj++){
                                       document.registration1.gender.length++;
                                       document.registration1.gender.options[counta].value = gender[counta];
                                       document.registration1.gender.options[counta].text = gender[counta];
                                       counta++;
    the in the html tags: the form code will be like this
    <select name="gender" class="txtMed" > </select>
    These codes will automatically populate data in your dropdown list

  • Searching in a Database plz help!

    Hi
    i'm stuck...
    doe anyone know how to search trough a database (of 10.000 records)
    iv'e made a search code butt it doesn;t work with a large database
    that's mine first probleem and mine second probleem is how to convert a String to a float and
    String to a char
    many thanks!!!!!
    jessie
    i'm programming with Visual J++6.0

    I've tried it butt it seems no to work
    does anyone know how to get the String name edit1 in Form1 to edit1 in Form2? by clicking the button in Form2
    pl help
    import com.ms.wfc.app.*;
    import com.ms.wfc.core.*;
    import com.ms.wfc.ui.*;
    import com.ms.wfc.html.*;
    * This class can take a variable number of parameters on the command
    * line. Program execution begins with the main() method. The class
    * constructor is not invoked unless an object of type 'Form1' is
    * created in the main() method.
    public class Form1 extends Form
         public Form1()
              // Required for Visual J++ Form Designer support
              initForm();          
              // TODO: Add any constructor code after initForm call
         * Form1 overrides dispose so it can clean up the
         * component list.
         public void dispose()
              super.dispose();
              components.dispose();
         * NOTE: The following code is required by the Visual J++ form
         * designer. It can be modified using the form editor. Do not
         * modify it using the code editor.
         Container components = new Container();
         Edit edit1 = new Edit();
         private void initForm()
              this.setText("Form1");
              this.setAutoScaleBaseSize(new Point(5, 13));
              this.setClientSize(new Point(292, 266));
              edit1.setLocation(new Point(80, 64));
              edit1.setSize(new Point(120, 20));
              edit1.setTabIndex(0);
              edit1.setText("");
              this.setNewControls(new Control[] {
                                       edit1});
         * The main entry point for the application.
         * @param args Array of parameters passed to the application
         * via the command line.
         public static void main(String args[])
              Application.run(new Form1());
              Application.run(new Form2());
    import com.ms.wfc.app.*;
    import com.ms.wfc.core.*;
    import com.ms.wfc.ui.*;
    import com.ms.wfc.html.*;
    * This class can take a variable number of parameters on the command
    * line. Program execution begins with the main() method. The class
    * constructor is not invoked unless an object of type 'Form2'
    * created in the main() method.
    public class Form2 extends Form
         public Form2()
              super();
              // Required for Visual J++ Form Designer support
              initForm();          
              // TODO: Add any constructor code after initForm call
         * Form2 overrides dispose so it can clean up the
         * component list.
         public void dispose()
              super.dispose();
              components.dispose();
         private void button1_click(Object source, Event e)
         * NOTE: The following code is required by the Visual J++ form
         * designer. It can be modified using the form editor. Do not
         * modify it using the code editor.
         Container components = new Container();
         Edit edit1 = new Edit();
         Button button1 = new Button();
         private void initForm()
              this.setText("Form2");
              this.setAutoScaleBaseSize(new Point(5, 13));
              this.setClientSize(new Point(300, 300));
              edit1.setLocation(new Point(56, 56));
              edit1.setSize(new Point(136, 20));
              edit1.setTabIndex(0);
              edit1.setText("");
              button1.setLocation(new Point(104, 192));
              button1.setSize(new Point(75, 23));
              button1.setTabIndex(1);
              button1.setText("haal");
              button1.addOnClick(new EventHandler(this.button1_click));
              this.setNewControls(new Control[] {
                                       button1,
                                       edit1});

  • Error opening database, Plz help!

    Dear Oracle Gurus,
    I have been getting this error message today, and I dont know what steps to be taken.
    SQL> alter database open;
    alter database open
    ERROR at line 1:
    ORA-16068: redo log file activation identifier mismatch
    ORA-00312: online log 1 thread 1: 'D:\ORACLE\ORADATA\ORCL\REDO01.LOG'
    I am not able to log in with any of the users except a sysdba like sys.
    In other words, I am only able to log into the database thru sys but cannot perform any operations on tables or objects.
    I am running Oracle 9i R2
    Please help how to get rid of this problem.

    ORA-00312 online log string thread string: 'string'
    Cause: This message reports the file name for details of another message.
    Action: Other messages will accompany this message. See the associated messages for the appropriate action to take.
    ORA-00313 open failed for members of log group string of thread string
    Cause: The online log cannot be opened. The file may not be in the expected location.
    Action: Specify the correct redo log file or make the log available, if necessary. Also, see the accompanying messages.
    ORA-00314 log string of thread string, expected sequence# string doesn't match string
    Cause: The online log is corrupted or is an old version.
    Action: Find and install the correct version of the log or reset the logs. Refer to the Oracle9i Database Administrator's Guide for recovery procedures.

  • I Want to connect to database . plz help

    dear programmers
    i use forms9i and oracle database 9i under winxp. the database is on the local machine .
    to connect database from the form i do the following:
    1-choose file | connect from the main menue
    2-type scott/tiger then click on connect
    the following message appear
    ORA-12560 TNS :protocol adapter error.
    please i urgently need to connect to database
    please help

    dear Pamela Gamer
    I really thank u for helping me .
    I did the following :
    1- from Start menu,I select Programs > Oracle9i Developer Suite > Forms Developer > Start OC4J Instance. I waited till the window displays a message that OC4J has been initialized, and I minimized the window,and i did not close it.
    2-I opened my form and connected my database successfuly.
    3- when i started to run my form the same message appeared ( frm-10142: the http listener is not running on 127.0.0.1 at port 8888 . please start the listener or check your runtime perference)
    i do not know why it appeared again .i want to know what is the problem . in fact i hardly need to shift to forms9i, but this problem makes me disapointed.
    if you know the solution , please help me
    thank u again for helping me
    tarek

  • Storing emails offline in database problem plz help me

    hello friends all .
    i wana store all the emails which i get from INBOX folder in database i am using Microsoft Access 2000 for it the below code get all the mails from INBOX and are stored in Array now plz some one help and send a code to store each field of message in data base..
    my database table name is mails
    Fields name -------------------Data Type
    mailid ----------------------- Autonumber
    from -------------------------- Text max length 255 chars (avaliable)
    to ---------------------------- Text max length 255 chars (avaliable)
    bcc --------------------------- Text max length 255 chars (avaliable)
    cc ---------------------------- Text max length 255 chars (avaliable)
    subject ------------------------ Text max length 255 chars (avaliable)
    attachments -------------------- Text max length 255 chars (avaliable)
    now what i want is to store the path of attachments store in directory
    Properties props = new Properties();
    String host = pop3.getText ();
    String provider = "pop3";
    try {
    Session session = Session.getDefaultInstance (props,
    new MailAuthenticator());
    Store store = session.getStore (provider);
    store.connect (host,null,null);
    Folder inbox = store.getFolder ("INBOX");
    if (inbox== null){
    System.out.println ("no inbox");
    inbox.open (Folder.READ_ONLY);
    Message[] messages= inbox.getMessages ();
    for (int i =0 ; i<messages.length;i++){
    messages.writeTo(System.out)
    // what should i do here to store each message in database plz help me
    inbox.close (false);
    store.close ();
    catch(Exception ep){
    ep.printStackTrace();
    i'll be very thankfull plz help i try my best but didnt get success plz plz ! send a working code which i can learn and implement or send any file which do this work so that i can get help .
    thank you

    Unfortunately what you are trying to do is a little more complicated than just posting some code.
    To get the message content and any attachments you need to "parse" the MIME message you get from the store. An email will (should) be a multipart mime construct. You need to get all the "Parts" out of the message and put them into your relevant database fields.
    The "header" elements can be obtained just using the methods of the Message objects you are getting back. Have a look at the javadoc for the javax.mail.Message abstract class.
    As for example code, here's some old code I had lying around which parses a multipart message to get the various parts.
    There is a sample "main" method which should explain how it works:
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.util.*;
    import java.io.*;
    * <p>Title: </p>
    * <p>Description: Parses a mime message to get the relevant parts.<BR>
    * <p>Copyright: Copyright (c) 2002</p>
    * @author Jason Polites
    * @version 1.0
    public class MimeMessageParser {
       * Gets the parts from the MimeMessage
       * Use null contentType to ignore
       * Use null disposition to ignore
      public static void getParts(List parts, Part p, String contentType, String disposition)
          throws MessagingException, IOException
        Object content = p.getContent();
        String currentDisposition = p.getDisposition();
        String currentContentType = p.getContentType();
        // now we need to check if the part was a multipart...
        if(content instanceof Multipart)
          Multipart mp = (Multipart)content;
          // Now we need to delve into the parts
          for(int i=0;i<mp.getCount();i++)
            getParts(parts, mp.getBodyPart(i), contentType, disposition);
        // check to the contentType
        if(contentType == null) {
          // we don't need to check
          if(disposition == null) {
            // no need to check
            // add the part
            parts.add(p);
            //index++;
          else if(currentDisposition != null && currentDisposition.startsWith(disposition))
            // add the part
            parts.add(p);
        else if(p.isMimeType(contentType)) {
          // Check the disposition
          if(disposition == null) {
            // no need to check
            // add the part
            parts.add(p);
          else if(currentDisposition != null && currentDisposition.startsWith(disposition))
            // add the part
            parts.add(p);
       * Gets the parts which match any of the dispositions
       * @param parts
       * @param contentTypes
       * @param disposition
       * @return
      public static List getMultiplePartsFromList(List parts, String contentType, String[] dispositions)
          throws IOException, MessagingException
        List matchedParts = null;
        for(int i = 0; i < dispositions.length; i++) {
          if(matchedParts == null) {
            matchedParts = getPartsFromList(parts, contentType, dispositions);
    else
    matchedParts.addAll(getPartsFromList(parts, contentType, dispositions[i]));
    return matchedParts;
    public static List getPartsFromList(List parts, String contentType, String disposition)
    throws MessagingException, IOException
    LinkedList matchedParts = new LinkedList();
    Part p = null;
    Object content = null;
    String currentDisposition = null;
    String currentContentType = null;
    for(int i = 0; i < parts.size(); i++) {
    p = (Part)parts.get(i);
    content = p.getContent();
    currentDisposition = p.getDisposition();
    currentContentType = p.getContentType();
    if(contentType == null) {
    // we don't need to check
    if(disposition == null) {
    // no need to check
    matchedParts.add(p);
    else if(currentDisposition != null && currentDisposition.startsWith(disposition))
    matchedParts.add(p);
    else if(p.isMimeType(contentType)) {
    // Check the disposition
    if(disposition == null) {
    // no need to check
    matchedParts.add(p);
    else if(currentDisposition != null && currentDisposition.startsWith(disposition))
    matchedParts.add(p);
    return matchedParts;
    public static void main(String[] args) {
    try {
    File email = new File("C:\\test.eml");
    InputStream source = null;
    MimeMessage message = null;
    MimeMessageParser parser = null;
    parser = new MimeMessageParser();
    // First, construct an inputstream for the message file
    source = new FileInputStream(email);
    String host = "localhost";
    boolean sessionDebug = false;
    // Create some properties and get the default Session.
    Properties props = System.getProperties();
    props.put("mail.host", host);
    props.put("mail.transport.protocol", "smtp");
    Session mailSession = Session.getDefaultInstance(props, null);
    // Set debug on the Session so we can see what is going on
    // Passing false will not echo debug info, and passing true
    // will.
    mailSession.setDebug(sessionDebug);
    message = new MimeMessage(mailSession, source);
    // parse the message...
    LinkedList parts = new LinkedList();
    MimeMessageParser.getParts(parts, message, null, null);
    Part p;
    Attachment a;
    String[] dispositions = new String[2];
    dispositions[0] = MimeMessage.INLINE;
    dispositions[1] = MimeMessage.ATTACHMENT;
    List attachments = MimeMessageParser.getMultiplePartsFromList(parts, null, dispositions);
    //Just for testing.. print out the parts...
    for(int i = 0; i < attachments.size(); i++) {
    System.out.println("Part " + i + " content type: " + ((Part)attachments.get(i)).getContentType());
    catch (Exception ex) {
    ex.printStackTrace();

  • I cant read correct single quote from mySQL database...

    I cant read correct single quote from mySQL database, pls help. What i'm talking about. I must import, "J'adore" for example in my DB and I'm doing this. Thats ok. But when I try to read this value from my DB through JDBC I'm receiving SQL exception (because JDBC thinks that i didn't close may quote). If somebody knows solution for this problem lets tell me.

    I'm not sure I got your question correctly, but maybe
    this solves your problem:
    Connection conn = // Wherever you get it from
    PreparedStatement query =
    = conn.prepareStatement("INSERT INTO table_A (field_A) VALUES (?)");
    query.setString(1, "J'adore");
    query.execute();
    query.close()Regards, Eirikthe select variation which i think you mean the WHERE clause would be...
    Connection conn = // Wherever you get it from
    PreparedStatement query = conn.prepareStatement("SELECT * FROM table_A WHERE field_A = ?");
    query.setString(1, "J'adore");
    ResultSet rs = query.executeQuery();

  • Need help connecting a remote MySql database from Iphone

    Hi, i need to connect to a remote MySql DataBase in windows from IPhone but..... i'm a noob with Xcode and Objective-C.
    Can someone help me or explain me the way to do it plz?
    Message was edited by: Krovax87
    Message was edited by: Krovax87

    I do not think MCPKit will help you on the iPhone. It is just an Objective-C wrapper around the standard mysql libraries which are not available for the iPhone. Your best bet would be to post on the mysql forums and see if you can get any help.
    You can try extracting the mysql client library source code into a separate static library project, and see if you can get it to build for the iPhone.

  • Plz help using ms access as database,i want to create a login page in java

    hye frnz... plz help me m new to java
    m using ms access as database and try to create a login page where user type username and pw
    i had enter valid user entries in database i checked connectivity is working i want as user login the main window must open after checking username and pw field to database but
    now there is an error class not found exception sun:jdbc...... error
    plz help me i had stuck frm 4 days */
    import java.sql.DriverManager;
    import java.sql.Connection;
    import java.sql.Statement;
    import java.sql.ResultSet;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    class Login extends JFrame
    //Component Declarations
    JLabel jlb1,jlb2;
         JTextField jtf1;
         JPasswordField jpf1;
         JButton jb1,jb2;
         //Constructor
         Login()
         //frame settings
              setTitle("Login Dialog");
              setLayout(new GridBagLayout());
              GridBagConstraints gbc = new GridBagConstraints();
              setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
              Dimension d= Toolkit.getDefaultToolkit().getScreenSize();
              setBounds(d.width/2-175,d.height/2-100,350,200);
              gbc.insets=new Insets(7,7,7,7);
         //adding components
              jlb1=new JLabel("User ID");
              gbc.gridx=0;
              gbc.gridy=0;
              add(jlb1,gbc);
              jlb2=new JLabel("Password");
              gbc.gridx=0;
              gbc.gridy=1;
              add(jlb2,gbc);
              jtf1=new JTextField(10);
              gbc.gridx=1;
              gbc.gridy=0;
              add(jtf1,gbc);
              jpf1=new JPasswordField(10);
              gbc.gridx=1;
              gbc.gridy=1;
              add(jpf1,gbc);
              jb1=new JButton("Login");
              gbc.gridx=0;
              gbc.gridy=2;
              add(jb1,gbc);
              jb1.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                   Connection conn=null;
                        Statement stmt=null;
                        boolean found=false;
                   try
                             Class.forName("sun.jdbc.driver.JdbcOdbcDriver");
                             String dataSourceName = "Inventory";
                             String dbURL = "jdbc:odbc:" + dataSourceName;
                             conn=DriverManager.getConnection(dbURL, "","");
                             stmt=conn.createStatement();
                             ResultSet rst=stmt.executeQuery("Select * from User");
                             System.out.println(jtf1.getText()+"/t"+jpf1.getPassword());
                             while(rst.next())
                                  System.out.println( rst.getString(1) +"/t"+ rst.getString(2));
              if(jtf1.getText().equals(rst.getString(1).trim()) && new String(jpf1.getPassword()).equals(rst.getString(2).trim()))
                                       found=true;
                                       rst.close();
                                       dispose();
                                       MainWindow mw= new MainWindow();     /*created min window object created to be opend after login but not working*/     
                                       break;
                             rst.close();
                             stmt.close();
                             conn.close();                    
                        catch(ClassNotFoundException e){System.out.print(e);}
                        catch(Exception e){System.out.print(e);}
                        if(found==false) /*this portion is executing and dialog box appears invalid name and pw with class not found exception sun:jdbc.......on console */
                             JOptionPane.showMessageDialog(null,"Invalid username or password",
                                  "Error Message",JOptionPane.ERROR_MESSAGE);
              jb2=new JButton("Clear");
              gbc.gridx=1;
              gbc.gridy=2;
              add(jb2,gbc);
              jb2.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        jtf1.setText("");
                        jpf1.setText("");
                        jtf1.requestFocus();
              setSize(350,200);
              setVisible(true);
              jtf1.requestFocus();
         public static void main(String args[])
    Login l=new Login();
    Edited by: 795772 on Sep 19, 2010 4:44 AM

    795772 wrote:
    hye frnz... plz help me m new to java
    m using ms access as database and try to create a login page where user type username and pw
    i had enter valid user entries in database i checked connectivity is working i want as user login the main window must open after checking username and pw field to database but
    now there is an error class not found exception sun:jdbc...... error
    plz help me i had stuck frm 4 days */
    <snip>The subject of this forum is Oracle databases. How does your problem relate to that subject?
    Two bits of advice:
    1) Make sure you ask questions in a forum related to your problem.
    2) If you want to be taken seriously as a professional, drop the MS IM Speak and use the language of the forum. In this forum it is English, which is successfully used by many people for whom English is far from their native language.

  • Help with connection to mysql database, Getting error : No suitable Driver

    Below is my code :
    1) i have added the mysql driver (mm.mysql-2.0.14-bin.jar)in my classpath
    2) the code is getting compiling properly
    3) while running it using tomcat, it says "NO SUITABLE DRIVER"
    PLEASE HELP !!
    import java.io.*;
    import java.text.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    public class logincheck extends HttpServlet {
    public void doGet(HttpServletRequest request,HttpServletResponse response)
    throws IOException, ServletException
    Connection con = null;
    PrintWriter out = response.getWriter();
    response.setContentType("text/html");
    PreparedStatement stmt = null;
    ResultSet rs = null;
    String userid = request.getParameter("userid");
    String password = request.getParameter("password");
    try {
    /** LOADING THE DRIVER FOR MYSQL DATABASE ***/
    Class.forName ("org.gjt.mm.mysql.Driver";
    } catch (ClassNotFoundException e) {
    e.printStackTrace();
    } //End of try-catch 1
    try{
         /*** CONNECTING TO THE DATABASE USING DATABASE NAME, USERNAME AND PASSWORD */
    con = DriverManager.getConnection("jdbc:mysql://localhost:8080/own");
    /****** this checks whether the entry for the user is in the database *****/
    stmt = con.prepareStatement("SELECT *FROM userinfo WHERE userid = ? AND passwd = ?");
    stmt.setString(1,userid);
    stmt.setString(2,password);
    rs = stmt.executeQuery();
    if(!rs.next())
    else
         /****************** IF THE USER AND PASSWORD ARE VALID *****************/
    //} // END OF RS.....
    // NEED HTML FOR INVALID USERID SHOWING MESSAGE ...
    con.close();
    }catch(SQLException esql){
    System.out.println(esql.getMessage());
    } // End of try-catch 2
    } // goGet
    public void doPost(HttpServletRequest request,HttpServletResponse response)
    throws IOException, ServletException {
    doGet(request, response);
    } // goPost
    } // end logincheck function ...

    And i see another thing that confuses me. Your URL connection string is
    con = DriverManager.getConnection("jdbc:mysql://localhost:8080/own"); meaning that your database is in your machine and listens in port 8080 for incoming connections. But that is the default port that Tomcat listens! Maybe you should change this line to
    con = DriverManager.getConnection("jdbc:mysql://localhost:3306/own");where 3306 is MySQL's default port.
    Hope these help.

  • MySQL Boken Pipe Exception...Plz Help Me Urgently

    Hello Friends....
    When I shifted my Java application which has MySQL(Linux has MySQL - 4.1.21-standard version. ) as a backend on Linux Platform I encountered following exception...
    com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
    ** BEGIN NESTED EXCEPTION **
    java.net.SocketException
    MESSAGE: Broken pipe
    STACKTRACE:
    java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
    at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2692)
    at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2621)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1552)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1666)
    at com.mysql.jdbc.Connection.execSQL(Connection.java:2994)
    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:936)
    at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1030)
    at ServerThread.run(ServerThread.java:98)
    ** END NESTED EXCEPTION **
    its working fine when I tested it on Windows patform with MySql 5.0 as backend.
    Plz Help me. I get struck on thi sproblem from last 2 days.
    //PremInd
    Message was edited by:
    Prem_India
    Message was edited by:
    Prem_India

    Thanks for your response....
    I'm developing chat application. In my server side code I called a thered which listen for all request for that user. The exception is occured in thread. Here is sanpshot of code...
    public class ServerThread extends Thread
    // Variable Declaration
    public ServerThread( Server server, Socket socket, String acntName, String opratorID )
        this.server = server;
        this.socket = socket;
        this.accName1 = acntName;
        this.oprID1 = opratorID;
        try
              Class.forName("com.mysql.jdbc.Driver").newInstance();                
            con = DriverManager.getConnection("jdbc:mysql://localhost/livechatdb","root","");
        catch(Exception ee)
             System.out.println("Break in ServerThread Cons "+ee);
        start();
      public void run()
        String savacc="";
        try
          DataInputStream din = new DataInputStream( socket.getInputStream() );
          DataOutputStream dos = new DataOutputStream(socket.getOutputStream());
          String message;              
          while (true)
            System.out.println("Thread Runnnnnning..");
            message = din.readUTF();           
            System.out.println("~~~~ "+message);
           if(message.startsWith("^%%^"))
                   StringTokenizer stok = new StringTokenizer(message,"~");
                   String rmv1 = stok.nextToken();
                   String cID1 = stok.nextToken();
                   String accNm1 = stok.nextToken();
                   String oprID1 = stok.nextToken();
                   String deptNm1= stok.nextToken();              
                   String IPAddress1 = stok.nextToken();
                   String oprName1 = stok.nextToken();
                   PreparedStatement pStmt1;
                     rs.close();
                   try
                           System.out.println(" Line 9999 99999 ");         
                           pStmt1 = con.prepareStatement("Select status from Customer where custID = ? and accName= ? ");
                            pStmt1.setString(1,cID1);
                            pStmt1.setString(2,accNm1);                      
                           rs = pStmt1.executeQuery();       
                          System.out.println(" Line 100 1000 1000000  ");
                           while(rs.next())
                                  String stat = rs.getString("status");
                                  if(stat.equals("Chat Request"))
                                        /* set status to chatting in Cutomer table */
                                        String strStatus = "Chatting : "+oprName1;                                    
                                        pStmt = con.prepareStatement("Update Customer set status = ? where custID = ? and accName= ? ");
                                        System.out.println (" Line 107              107           107");
                                        pStmt.setString(1,strStatus);                                   
                                        pStmt.setString(2,cID1);
                                   pStmt.setString(3,accNm1);                                                                                    
                                 int i = pStmt.executeUpdate();
                                 System.out.println (" Line 112              112           112 "+i);
                                 dos.writeUTF("^%%^"+"~"+"Y"+"~"+IPAddress1);
                                 server.sendUpdateChatOperTbl(deptNm1,accNm1,cID1,"*",strStatus);                                                            
                                  else
                                        dos.writeUTF("^%%^"+"~"+"N"+"~"+IPAddress1);
                 catch (Exception ex)
                        System.out.println (" Line 131  131   131  "+ex);
           else if(message.startsWith("!O!"))  //chat opr connect
                            // other stuff
    After this line exception occured System.out.println(" Line 9999 99999 "); & it catch at this line System.out.println (" Line 131 131 131 "+ex);
    Thanks.
    Waiting for Reply...

  • Transfer Mysql database to another computer.. need help..

    i need help to transfer mysql database to other computer. i read a lot of forum but still did not understand..
    some video also but still confuse.. can anyone help me..  that teach step by step.. if migrate, it say need to install obdc admin.. but what is that? n how it be installed to another computer.. sorry.. i really did not have any idea in this.. i am using
    c#

    This is a Microsoft SQL Server T-SQL programming forum.
    Search for a MySQL forum to get assistance.
    Kalman Toth Database & OLAP Architect
    SELECT Video Tutorials 4 Hours
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

Maybe you are looking for