MySQL J-connector

Hi there,I want to use JSP to communicate with MySQL Server,where can I get it and how do I go about the configuration..
thank you,
Javas!

For MySQL
http://www.mysql.com/
In Windows, installation is very easy. But for Linux, u should be careful to every stage. u may follow http://perl.about.com/library/weekly/aa110800a.htm
For connector
http://www.mysql.com/downloads/api-jdbc.html
Keep the jar in /common/lib in the Tomcat installation directory. The driver class is com.mysql.jdbc.Driver and url is like jdbc:mysql://server_name:port_no/database_name . The default port is 3306.
For JNDI datasources with Tomcat see JNDI Howto in Tomcat documentation.
That's it.
Hope it helps.
Hafizur Rahman
SCJP

Similar Messages

  • Unable to install MySQL J Connector, its unable to launch jar file in OS mavericks 10.9.. please

    Hello all,
    i am referring following link to create connector for connection between mysql and sqldeveloper,
    while installing jar file for mysql J conncetor its telling unable to launch jar file.
    This is the latest OS and they have java preferences from utility folder and gave java control panel instead in system prefernces which is picking the runtime latest java version from oracle site.
    Please refer "http://reviews.cnet.com/8301-13727_7-57533880-263/java-preferences-missing-after -latest-os-x-java-update/" for the same.
    Please suggest ASAP.
    Thanks
    AbhiNU

    sorry i missed link in above descriptin
    http://mysql-dba-journey.blogspot.com/2009/05/installing-oracle-sql-developer-or acle.html

  • Configuring MySQL and Connector/J server

    I now have a working Applet that, when run from the compiler, will retrieve and update a MySQL database. Unfortunately, when I run the same Applet in a web brower (on an Apache server), the Applet does not pass values to/from the MySQL database.
    Is this a problem with my Applet or server? Any idea how to correctly set the server to utilize Connector/J and JDBC? Why is it working with the java console and JBuilder but not web browsers?
    in case it helps:
    Apache server
    MySQL database
    JBuilder compiler (applet works when run from here)
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import javax.swing.*;
    import java.sql.*;
    public class score
        extends JApplet {
      Container cp = getContentPane();
      JTextField fright = new JTextField(3);
      JTextField fleft = new JTextField(3);
      JButton refresh = new JButton("CheckDB");
      JButton left1 = new JButton("1");
      JButton left2 = new JButton("2");
      JButton left3 = new JButton("3");
      JButton left1m = new JButton("-1");
      JButton left2m = new JButton("-2");
      JButton left3m = new JButton("-3");
      JButton right1 = new JButton("1");
      JButton right2 = new JButton("2");
      JButton right3 = new JButton("3");
      JButton right1m = new JButton("-1");
      JButton right2m = new JButton("-2");
      JButton right3m = new JButton("-3");
      int lscore;
      int rscore;
      String l = ("");
      String r = ("");
      String updateString;
      Connection con = null;
      Statement st = null;
      ResultSet rs = null;
      public void init() {
        JPanel top = new JPanel();
        top.add(fleft);
        top.add(fright);
        top.add(refresh);
        JPanel right = new JPanel();
        right.add(right1);
        right.add(right2);
        right.add(right3);
        right.add(right1m);
        right.add(right2m);
        right.add(right3m);
        JPanel left = new JPanel();
        left.add(left1);
        left.add(left2);
        left.add(left3);
        left.add(left1m);
        left.add(left2m);
        left.add(left3m);
        top.setLayout(new FlowLayout());
        left.setLayout(new GridLayout(6, 1));
        right.setLayout(new GridLayout(6, 1));
        cp.setLayout(new BorderLayout());
        cp.add(top, BorderLayout.CENTER);
        cp.add(right, BorderLayout.EAST);
        cp.add(left, BorderLayout.WEST);
        right1.addActionListener(new ButtonListener());
        right2.addActionListener(new ButtonListener());
        right3.addActionListener(new ButtonListener());
        right1m.addActionListener(new ButtonListener());
        right2m.addActionListener(new ButtonListener());
        right3m.addActionListener(new ButtonListener());
        left1.addActionListener(new ButtonListener());
        left2.addActionListener(new ButtonListener());
        left3.addActionListener(new ButtonListener());
        left1m.addActionListener(new ButtonListener());
        left2m.addActionListener(new ButtonListener());
        left3m.addActionListener(new ButtonListener());
        refresh.addActionListener(new ButtonListener());
    //                    LISTENERS/FUNCTIONS
      class ButtonListener
          implements ActionListener {
        public void actionPerformed(ActionEvent e) {
          if (e.getSource() == refresh) {
            try {
          Class.forName("com.mysql.jdbc.Driver").newInstance();
          con = DriverManager.getConnection("jdbc:mysql://192.168.0.3:3306/bball",
            "root", "");
          st = con.createStatement();
          rs = st.executeQuery("SELECT score FROM score");
          int count = 0;
          while(rs.next()) {
            int g = rs.getInt(1);
            if (count == 0) {lscore = g;}
            if (count == 1) {rscore = g;}
            count++;
        } catch (Exception d) {
          System.err.println("Exception: " + d.getMessage());
        } finally {
          try {
            if(rs != null)
              rs.close();
            if(st != null)
              st.close();
            if(con != null)
              con.close();
          } catch (SQLException d) {
        l = String.valueOf(lscore);
        fleft.setText(l);
        r = String.valueOf(rscore);
        fright.setText(r);
          if (e.getSource() == left1) {
            lscore = lscore + 1;
            l = String.valueOf(lscore);
            updateString = "UPDATE SCORE " +
            "SET SCORE = " + l + " WHERE SIDE = 1";
            try {
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              con = DriverManager.getConnection("jdbc:mysql://192.168.0.3:3306/bball",
                                                "root", "");
              st = con.createStatement();
              st.executeUpdate(updateString);
            catch (Exception d) {
              System.err.println("Exception: " + d.getMessage());
            finally {
              try {
                if (st != null) {
                  st.close();
                if (con != null) {
                  con.close();
              catch (SQLException d) {
            fleft.setText(l);
          if (e.getSource() == left2) {
            lscore = lscore + 2;
            l = String.valueOf(lscore);
            updateString = "UPDATE SCORE " +
            "SET SCORE = " + l + " WHERE SIDE = 1";
            try {
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              con = DriverManager.getConnection("jdbc:mysql://192.168.0.3:3306/bball",
                                                "root", "");
              st = con.createStatement();
              st.executeUpdate(updateString);
            catch (Exception d) {
              System.err.println("Exception: " + d.getMessage());
            finally {
              try {
                if (st != null) {
                  st.close();
                if (con != null) {
                  con.close();
              catch (SQLException d) {
            fleft.setText(l);
          if (e.getSource() == left3) {
            lscore = lscore + 3;
            l = String.valueOf(lscore);
            updateString = "UPDATE SCORE " +
            "SET SCORE = " + l + " WHERE SIDE = 1";
            try {
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              con = DriverManager.getConnection("jdbc:mysql://192.168.0.3:3306/bball",
                                                "root", "");
              st = con.createStatement();
              st.executeUpdate(updateString);
            catch (Exception d) {
              System.err.println("Exception: " + d.getMessage());
            finally {
              try {
                if (st != null) {
                  st.close();
                if (con != null) {
                  con.close();
              catch (SQLException d) {
            fleft.setText(l);
          if (e.getSource() == left1m) {
            lscore = lscore - 1;
            l = String.valueOf(lscore);
            updateString = "UPDATE SCORE " +
            "SET SCORE = " + l + " WHERE SIDE = 1";
            try {
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              con = DriverManager.getConnection("jdbc:mysql://192.168.0.3:3306/bball",
                                                "root", "");
              st = con.createStatement();
              st.executeUpdate(updateString);
            catch (Exception d) {
              System.err.println("Exception: " + d.getMessage());
            finally {
              try {
                if (st != null) {
                  st.close();
                if (con != null) {
                  con.close();
              catch (SQLException d) {
            fleft.setText(l);
          if (e.getSource() == left2m) {
            lscore = lscore - 2;
            l = String.valueOf(lscore);
            updateString = "UPDATE SCORE " +
            "SET SCORE = " + l + " WHERE SIDE = 1";
            try {
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              con = DriverManager.getConnection("jdbc:mysql://192.168.0.3:3306/bball",
                                                "root", "");
              st = con.createStatement();
              st.executeUpdate(updateString);
            catch (Exception d) {
              System.err.println("Exception: " + d.getMessage());
            finally {
              try {
                if (st != null) {
                  st.close();
                if (con != null) {
                  con.close();
              catch (SQLException d) {
            fleft.setText(l);
          if (e.getSource() == left3m) {
            lscore = lscore - 3;
            l = String.valueOf(lscore);
            updateString = "UPDATE SCORE " +
            "SET SCORE = " + l + " WHERE SIDE = 1";
            try {
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              con = DriverManager.getConnection("jdbc:mysql://192.168.0.3:3306/bball",
                                                "root", "");
              st = con.createStatement();
              st.executeUpdate(updateString);
            catch (Exception d) {
              System.err.println("Exception: " + d.getMessage());
            finally {
              try {
                if (st != null) {
                  st.close();
                if (con != null) {
                  con.close();
              catch (SQLException d) {
            fleft.setText(l);
          if (e.getSource() == right1) {
            rscore = rscore + 1;
            r = String.valueOf(rscore);
            updateString = "UPDATE SCORE " +
            "SET SCORE = " + r + " WHERE SIDE = 2";
            try {
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              con = DriverManager.getConnection("jdbc:mysql://192.168.0.3:3306/bball",
                                                "root", "");
              st = con.createStatement();
              st.executeUpdate(updateString);
            catch (Exception d) {
              System.err.println("Exception: " + d.getMessage());
            finally {
              try {
                if (st != null) {
                  st.close();
                if (con != null) {
                  con.close();
              catch (SQLException d) {
            fright.setText(r);
          if (e.getSource() == right2) {
            rscore = rscore + 2;
            r = String.valueOf(rscore);
            updateString = "UPDATE SCORE " +
            "SET SCORE = " + r + " WHERE SIDE = 2";
            try {
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              con = DriverManager.getConnection("jdbc:mysql://192.168.0.3:3306/bball",
                                                "root", "");
              st = con.createStatement();
              st.executeUpdate(updateString);
            catch (Exception d) {
              System.err.println("Exception: " + d.getMessage());
            finally {
              try {
                if (st != null) {
                  st.close();
                if (con != null) {
                  con.close();
              catch (SQLException d) {
            fright.setText(r);
          if (e.getSource() == right3) {
            rscore = rscore + 3;
            r = String.valueOf(rscore);
            updateString = "UPDATE SCORE " +
            "SET SCORE = " + r + " WHERE SIDE = 2";
            try {
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              con = DriverManager.getConnection("jdbc:mysql://192.168.0.3:3306/bball",
                                                "root", "");
              st = con.createStatement();
              st.executeUpdate(updateString);
            catch (Exception d) {
              System.err.println("Exception: " + d.getMessage());
            finally {
              try {
                if (st != null) {
                  st.close();
                if (con != null) {
                  con.close();
              catch (SQLException d) {
            fright.setText(r);
          if (e.getSource() == right1m) {
            rscore = rscore - 1;
            r = String.valueOf(rscore);
            updateString = "UPDATE SCORE " +
            "SET SCORE = " + r + " WHERE SIDE = 2";
            try {
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              con = DriverManager.getConnection("jdbc:mysql://192.168.0.3:3306/bball",
                                                "root", "");
              st = con.createStatement();
              st.executeUpdate(updateString);
            catch (Exception d) {
              System.err.println("Exception: " + d.getMessage());
            finally {
              try {
                if (st != null) {
                  st.close();
                if (con != null) {
                  con.close();
              catch (SQLException d) {
            fright.setText(r);
          if (e.getSource() == right2m) {
            rscore = rscore - 2;
            r = String.valueOf(rscore);
            updateString = "UPDATE SCORE " +
            "SET SCORE = " + r + " WHERE SIDE = 2";
            try {
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              con = DriverManager.getConnection("jdbc:mysql://192.168.0.3:3306/bball",
                                                "root", "");
              st = con.createStatement();
              st.executeUpdate(updateString);
            catch (Exception d) {
              System.err.println("Exception: " + d.getMessage());
            finally {
              try {
                if (st != null) {
                  st.close();
                if (con != null) {
                  con.close();
              catch (SQLException d) {
            fright.setText(r);
          if (e.getSource() == right3m) {
            rscore = rscore - 3;
            r = String.valueOf(rscore);
            updateString = "UPDATE SCORE " +
            "SET SCORE = " + r + " WHERE SIDE = 2";
            try {
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              con = DriverManager.getConnection("jdbc:mysql://192.168.0.3:3306/bball",
                                                "root", "");
              st = con.createStatement();
              st.executeUpdate(updateString);
            catch (Exception d) {
              System.err.println("Exception: " + d.getMessage());
            finally {
              try {
                if (st != null) {
                  st.close();
                if (con != null) {
                  con.close();
              catch (SQLException d) {
            fright.setText(r);
    }

    Thanks for the info! Though I'm still confused about this:
    There are two ways to deal
    with this: (1) make sure your database is running on
    the same server as Apache, or (2) sign your applet so
    that the user can allow it to perform insecure
    actions.The Apache and MySQL are running on the same machine so I don't see a problem with server access. How could I sign the applet to perform insecure actions?
    Also, does the Connector/J installation method have anything to do with it? All I did was copied the .jar file to the dirctory in JBuilder and jsdk (ie: "C:\j2sdk1.4.1_02\jre\lib\ext\mysql-connector-java-3.0.15-ga-bin.jar") and set the CLASSPATH. I don't see a JDBC service running in my Apache monitor- could Apache not be configued to handle JDBC?
    Thanks again!
    PS: Oh yeah- heh- sorry about not using methods- this is just a quick weekend hack job ;-)

  • Mysql connector & ssl

    Hi,
    I have enabled ssl on my mysql server and am using useSSL=true&requireSSL=true in my jdbc connector url.
    I am getting the following error:
    The root cause was that: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** com.mysql.jdbc.CommunicationsException MESSAGE: Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** javax.net.ssl.SSLHandshakeException MESSAGE: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target STACKTRACE: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1591)  at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:187) at
    If anyone had any success connecting to mysql via ssl I would appreciate any help.
    Thanks!

    I used the mysql odbc connector with the certificate and it worked fine so
    the problem is not the certificate.
    2009/4/8 Alexei Yakovenko <[email protected]>
    drieh,
    >
    A new message was posted in the thread "mysql connector &amp; ssl":
    >
    http://forums.adobe.com/message/1877560#1877560
    >
    Author  : Alexei Yakovenko
    Email   : [email protected]
    Profile : http://forums.adobe.com/people/injun%20%5B576871%5D
    >
    Message:

  • [solved] MySQL Connector C++ 1.0.5

    Hello everyone,
    I'm trying to connect to a MySQL db via C++. MySQL has the connector and API available for this. In the process of building this I've run into some troubles/questions.
    First off is that MySQL states that MySQL Workbench uses this connector:
    MySQL wrote:Note that MySQL Workbench is successfully using MySQL Connector/C++.
    source (at the bottom of the page) but I can't seem to find any files which are created by the connector itself.
    Second is that when I create a package file it contains files that - I think - shouldn't be included (or at least not in those directories).
    PKGBUILD used:
    pkgname=mysql-connector-c++
    pkgver=1.0.5
    pkgrel=1
    pkgdesc="MySQL Connector/C++ is a MySQL database connector for C++"
    arch=(i686)
    url="http://dev.mysql.com/doc/refman/5.1/en/connector-cpp.html"
    license=('gpl')
    depends=('mysql-clients')
    makedepends=('cmake>=2.4' 'glibc>=2.2.3')
    source=(http://download.softagency.net/MySQL/Downloads/Connector-C++/$pkgname-$pkgver.tar.gz)
    md5sums=('f0ad6655f3ea7db8df3215fa928cba03') #generate with 'makepkg -g'
    build() {
    cd "$srcdir/$pkgname-$pkgver"
    # remove file that is included in release but should be generated by cmake
    rm cppconn/config.h
    # remove some possible old cmake cache
    rm CMakeCache.txt
    # patch for use with gcc-4.4
    patch -p0 < ${startdir}/mysql-connector-cpp-1.0.5-gcc44.patch
    cmake -G "Unix Makefiles" .
    make clean
    make || return 1
    make DESTDIR="$pkgdir/" install
    # vim:set ts=2 sw=2 et:
    output of pacman -Qlp mysql-connector-c++-1.0.5-1-i686.pkg.tar.gz
    mysql-connector-c++ /usr/
    mysql-connector-c++ /usr/local/
    mysql-connector-c++ /usr/local/ANNOUNCEMENT
    mysql-connector-c++ /usr/local/COPYING
    mysql-connector-c++ /usr/local/README
    mysql-connector-c++ /usr/local/include/
    mysql-connector-c++ /usr/local/include/cppconn/
    mysql-connector-c++ /usr/local/include/cppconn/build_config.h
    mysql-connector-c++ /usr/local/include/cppconn/config.h
    mysql-connector-c++ /usr/local/include/cppconn/connection.h
    mysql-connector-c++ /usr/local/include/cppconn/datatype.h
    mysql-connector-c++ /usr/local/include/cppconn/driver.h
    mysql-connector-c++ /usr/local/include/cppconn/exception.h
    mysql-connector-c++ /usr/local/include/cppconn/metadata.h
    mysql-connector-c++ /usr/local/include/cppconn/parameter_metadata.h
    mysql-connector-c++ /usr/local/include/cppconn/prepared_statement.h
    mysql-connector-c++ /usr/local/include/cppconn/resultset.h
    mysql-connector-c++ /usr/local/include/cppconn/resultset_metadata.h
    mysql-connector-c++ /usr/local/include/cppconn/statement.h
    mysql-connector-c++ /usr/local/include/cppconn/warning.h
    mysql-connector-c++ /usr/local/include/mysql_connection.h
    mysql-connector-c++ /usr/local/include/mysql_driver.h
    mysql-connector-c++ /usr/local/lib/
    mysql-connector-c++ /usr/local/lib/libmysqlcppconn-static.a
    mysql-connector-c++ /usr/local/lib/libmysqlcppconn.so
    mysql-connector-c++ /usr/local/lib/libmysqlcppconn.so.1
    mysql-connector-c++ /usr/local/lib/libmysqlcppconn.so.1.0.5
    The files bothering me are:
    /usr/local/ANNOUNCEMENT
    /usr/local/COPYING
    /usr/local/README
    Anyone who can enlighten me?:rolleyes:
    Thanks in advance,
    Arjan Gelderblom
    Last edited by Bloged (2009-11-17 09:27:49)

    Bloged wrote:
    Thanks wonder for your reply.
    How do I move files using PKGBUILD? I've found an install -D command but that looks at best at copying the file:
    install -D COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING
    Another question is that the patch that is executed is only for gcc-4.4 is there a way to have an if statement for that?
    no. we don't have any other version in our repo and that patch will work also with older gcc
    Edit: a simple solution is to copy them using install -D and then remove them... is this the correct sollution?
    yes. and remove the others two files as well.

  • Can't instal mysql connector extension for libreoffice

    I am trying to install a mysql native connector on libreoffice but I get an error during installation:
    "loading component library failed: file:///home.../uno_packages/cache/uno_packages/lu2gkbw6.tmp_/mysql-connector-ooo-1.0.1-linux-intel.oxt/mysqlc.uno.so"
    First I thought it was incompatible with LibreOffice 3.4 as it is an OpenOffice.org extension actually, but I tried and it works at least on windows installtion.
    Has anyone encountered this?

    You would think by now that people would know.
    Tomcat (and any other application server) has its own ideas about Classpath. This is necessary so that each web application can have its own individual classpath setup.
    The classpath for a web application is
    - WEB-INF/classes
    - jar files in WEB-INF/lib
    - shared jar files. eg in Tomcat jar files in /common/lib and /shared/lib
    Setting the system classpath will NOT affect the classpath of a web application.
    To solve your problem:
    Put mysql-connector-java-3.1.12-bin.jar in your WEB-INF/lib directory.
    At that point the class should be found.
    Even better set up a JNDI datasource in Tomcat and use that:
    http://tomcat.apache.org/tomcat-5.0-doc/jndi-datasource-examples-howto.html
    Better again: Don't put sql code into a JSP. It doesn't belong there.
    meh,
    evnafets

  • LabSQL can not run with MySQL 64-bit ODBC connector

    I have developed a small piece of LabVIEW program to retrieve the data from MySQL database and displayed as curve with XY-Graph. The bridge between database and the program is the MySQL ODBC connector and the LabSQL VIs (which is quite useful). The program runs properly in my 32-bit computer for developing while a error caused in LabSQL part and stated that there is a architecture mismatch:
    Exception occured in Microsoft OLE DB Provider for ODBC Drivers: [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application in ADO Connection Open.vi->WeatherDataRetrive.vi
    Is there anyone encountered similar problem and would you please provide some help?
    Many thanks in advance.
    Harry

    Are you using LabVIEW 32 Bit? Even if you run on Windows 64 Bit any DLL loaded on behalve of an application has to have the bitness of that application, not the bitness of the OS. And I'm pretty sure that the ADO/DAO interface that LabSQL is using will not provide any bridging if the ODBC driver is not in the same bitness as the calling application.
    So if you are using LabVIEW 32 Bit, install the 32 Bit MyODBC driver or change to using 64 Bit LabVIEW instead, although there might be other problems with ADO/DAO not working properly for a 64 Bit application.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Unable to extract connector/j jar file(mysql)

    im have having a problem on extracting mysql's connector/j jar file on j2sdk1.4.0.
    and may i know does sun allows windows xp users to install various kind of versions of j2sdk? for example, install j2sdk1.4.0 into c:\j2sdk1.4.0, and j2sdk1.4.2_05 into c:\j2sdk1.4.2_05?
    what to do using j2sdk1.4.0 for connector/j?
    i would like to know manual steps instead if automatic step provided by netbean.
    i wish this problem could be solved as sonn as possible

    im have having a problem on extracting mysql's
    connector/j jar file on j2sdk1.4.0.I'm not sure what this means. The MySQL connector JAR isn't part of any JDK. You've got to download it and put it in your CLASSPATH.
    >
    and may i know does sun allows windows xp users to
    install various kind of versions of j2sdk? for
    example, install j2sdk1.4.0 into c:\j2sdk1.4.0, and
    j2sdk1.4.2_05 into c:\j2sdk1.4.2_05?
    what to do using j2sdk1.4.0 for connector/j?
    i would like to know manual steps instead if
    automatic step provided by netbean.
    i wish this problem could be solved as sonn as
    possible

  • MySQL connector between 10.4.8 Server Tomcat install and MAMP mySQL

    Hi all
    I was wondering if anyone has linked the OS X Server installed tomcat with mysql using the mysql java connector 5.0.4.
    We're hoping to use mamp as the apache and mysql base for our sites over the built in apache server, but know are stumbling on getting our MAMP apache/mysql talking with the OS X tomcat.
    Has anyone out there already done this - or can point to an uptodate walkthrough?
    Many thanks for any assistance!
    JT

    No docs that I am aware of but you do need to have a valid driver and DSN for the code you're using.
    You can find examples of code if you google it, it would be the same config as used with apache/tomcat/mysql.

  • Where ODBC Connector is defined in Windows registry?

    Good day!
    I have an app which use ODBC Connector, and it don't works as well. When I trying to access ODBC programmatically, I get an error from ODBC Driver Manager, smth like: " Data source not found and no driver specified, the default "
    (my OS language is different, so it's not verbatim).
    I changed MySQL ODBC Connector many times, I tried different versions and tried specify driver in registry manualy (in branch HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI). Also, I had tried to track how does it work step by step, and I  stop at odbc32.dll. As I think it is ODBC Driver Manager which can't find smth necessary, but what?

    This is more of a Windows Registry issue than a LabVIEW issue, does anyone know a good place to get support for that.  My Google-Fu is failing me .  All attempts to search for anything relating to Windows Registry and Icons tends to lead to changing the default icons in Windwos (My Computer, Recycle Bin, etc.).
    Unless there is a way for me to add the .ICO as a resource within the .exe that defaults to the file somehow.  I'm not seeing anything within LabVIEW to facilitate this, however...

  • Crystal Reports 2008, mySQL, JDBC, and ODBC

    Hello everyone.
    I have just spent a very challenging few days getting Crystal Reports 2008 Developer (advanced version) working with a mySQL data source.  I fell into several pits and narrowly escaped being eaten by monsters. I thought I'd share my experience to spare others the same trouble.  All the stuff I'm writing about here applies to the runtime as well as the Developer UI.
    I'm working on Windows Server 2008 R2, 64 bit, standard edition.  The mySQL server is 5.1.42. The mySQL ODBC connector is version 5.1.6.  You need the 32-bit version of this connector, even if you're on a 64-bit machine.
    Lessons learned:
    1. JDBC connectivity in Crystal Reports doesn't work correctly.  It consumes excessive memory when a report  requires lots of rows from a data base.  Don't even think about using it.
    2. Crystal Reports has a problem with ODBC for mySQL in which it sometimes gives a dialog box with these words in it.
    The alias requested 'SOME_TABLE_NAME', contains a combination
       of characters which is not considered to be valid.
    This error message come up when using items on Crystal's "Database" menu like "Set Datasource Location..."
    To fix this you need to make a registry change.  As far as I know this has to be done for each account on each machine running the Crystal Developer. (insert usual warning about registry editor). Find the key named:
    [HKEY_CURRENT_USER\Software\Business Objects\Suite 12.0\Crystal Reports\Database
    Create a new string value named InvalidAliasCharList Give it this value:
    .:{}()@&$#^!*~|%\\\"
    Notice that the last two characters are backslash double-quote.
    Good luck.  It actually works pretty well now that it's working.
    If any other community member can offer corrections or better ways of coping with this stuff, please do!

    Good morning,
    I was wondering if I may ask some additional help...
    We're on version 14.0.4.738 RTM and we are having the same issue.... need to enter the alias as table name with a backslash, ie serparate_work_orders\ for login credential reasons, but all the regedits listed seem to refer to locations in the registry that dont exist.
    Version 14 have two "database locations" from what i can see called...
    HKEY_CURRENT_USER\Software\SAP BusinessObjects\Suite XI 4.0\Crystal Reports\DatabaseOptions
    and
    HKEY_CURRENT_USER\Software\SAP BusinessObjects\Suite XI 4.0\Crystal Reports\DatabaseServer
    I've applied the patch to both these locations and still no joy, same error message!
    Any ideas?

  • MySQL /JDBC Question

    I began playing with JDBC a few days ago. I set up a database using mySQL and wrote a simple java program that will connect to it. Works good from the computer that holds the database.
    I try and run the same program from my secondary computer which does not have mySQL or ODBC mySQL drivers, I get com.mysql.jdbc.Driver for an error message. (Trying to access the database on my main computer via ip/databasename)
    My Question is, do you HAVE to have mySQL or Connector/ODBC installed on a computer if you wish to connect to a database on other computer??
    Here's where it prints the error message...
    try
    Class.forName("com.mysql.jdbc.Driver");
    catch (Exception e)
    JOptionPane.showMessageDialog(null, "ERROR = " + e.getMessage());
    I use this as my url..
    private final String url = "jdbc:mysql://122.122.122.122:3306/test123";
         

    Say I want to make a simple web applet that will
    access a database on my computer. The only way my
    vistors to my website will be able to access the
    database via the web applet is by having mySQL JDBC
    driver installed on their computers?yes.
    however.
    you can package up the JDBC driver as part of your jar with your applet so it doesn't require the user to "install" anything. it's just part of your applet.

  • Problem connecting to Mysql using JDBC

    Hi Everyone,
    I am trying to connect Mysql ad java applet and I am using the Mysql jdbc connector.
    I Took the mysql-connector-java-5.0.8-bin.jar file and put that in the library of jdk.
    Now i used the following code to connect to the database using Netbeans.
    package testmysql;
    import java.sql.*;
    public class Main
    public static void main (String[] args)
    Connection conn = null;
    try
    String userName = "root";
    String password = "";
    String url = "jdbc:mysql://localhost/rpms";
    Class.forName ("com.mysql.jdbc.Driver").newInstance ();
    conn = DriverManager.getConnection (url, userName, password);
    System.out.println ("Database connection established");
    catch (Exception e)
    System.err.println ("Cannot connect to database server");
    finally
    if (conn != null)
    try
    conn.close ();
    System.out.println ("Database connection terminated");
    catch (Exception e) { /* ignore close errors */ }
    But it displays Cannot connect to database server
    thoughMysql server is running.
    Can anyone tell me wats the prob in this.
    thanks

    String url = "jdbc:mysql://localhost/rpms";
    Class.forName ("com.mysql.jdbc.Driver").newInstance ();
    Is rpms the MySQL database?
    Is the database on the default port 3306?
    Is the MySQL JDBC JAR file in the classpath of the applet?
    newInstance() is not required to be invoked unless using <= JDK 2.0
    Replace:
    catch (Exception e)
    System.err.println ("Cannot connect to database server");
    with:
    catch (Exception e)
    System.err.println (e.getMessage());
    Edited by: dvohra09 on Apr 10, 2009 10:54 PM
    Edited by: dvohra09 on Apr 10, 2009 10:55 PM
    Edited by: dvohra09 on Apr 10, 2009 10:58 PM

  • Odbc connector verification failure

    Specs: 15 inch Macbook Pro, Intel Core i5, running Mavericks (OS X 10.9.2)
    I'm currently learning AJAX through an online course. I'm using MySQL Workbench + Apple's ODBC Admin. The problem is I can't test any of the class exercises because MySQL ODBC connector fails to install when its gets to the "Verifying file" stage.
    Can anyone tell me why this is?

    I tried the Actual ODBC driver, but I'm still encountering problems. Here is what happens when I try to open a page with Ajax functions included:
    This is with both Apache and MySQL running, and just using Actual ODBC Manager. My DSN and Driver settings were already in the Actual ODBC Manager:
    no idea what's wrong.

  • MySQL/j Stored procedure on Server Failure? is it a bug? workaround?

    Hi all, with the release of SE 6 pending, I thought that this issue should be addressed. As I'm not sure if it's a bug or not, I decided to post in this forum to see if anybody has haad experience with it, has a workaround or any other information that could be usefull.
    The issue:
    MySQL v5.x offers stored procedures. the MySQL/j connector has the ability to call these procedures.
    If you run the stored procedure localy through Java, the stored procedure executes perfectly.
    Once deployed onto a server, and the stored procedures on the same server in a mysql database and "ALL PRIVILAGES" including "EXECUTE ROUTINE" are granted. The stored procedure fails to run.
    The error returned by the mysql/j connector is this :
    "Driver requires declaration of procedure to either contain a 'nbegin' or 'n' to follow argument declaration, or SELECT privilege on mysql.proc to parse column types."
    Here is a link to a MySQL forum about the issue:
    http://forums.mysql.com/read.php?98,67532,67532#msg-67532
    So it appears that it is a java issue.
    Is there a workaround?
    Has anybody successfully been able to use Java with MySQL stored Procedures?? (Pretty sad if we havn't)
    Any help on this topic would be greatly appreciated.
    cheers!

    Yes, I read through the threads, that is Why I cam here after posting back with MySQL trying all the suggeestions, I still can't find the thread from the MySQL/J developer, I did find the one from a MySQL developer though.
    We can't actually change permissions oursevles with our currecnt Servlet host.
    So they changed permissions for us:
    We checked to see if we had permissions, All permissions are granted for the localhost.
    currently not sure how to check them for the '%' assignment
    Our host also tried to drop the procedurees and create them again with the invoker command, but this was also to no avail.
    I was also sure that it was a MySQL issue, but was hoping someobody had another method of a workaround.
    It seems to be something to do with Java wanting the metadata for registering output variables.

Maybe you are looking for

  • QuickTime 7.6 and Windows Vista UItimate x64

    Are we going to have a fix for the black bar on Windows Vista x64? It's been over 2 years I believe and there still isn't a fix for this quiet important problem. I know I can change the compatibility of my browser, but it's not what I want to do. I h

  • Change output type of Purchase Order

    Hi All, Is it possible to programmaticlly change(or add) the output medium in transaction me21n / me22n when a user creates a PO? I've been able to config the system to allow the PO to either be emailed or faxed upon the user saving. There is a requi

  • HU consumption against production order

    Hi Gurus I am struggling to determine how we will consume HU managed goods in production.  The scenario is for the rework or repack of finished goods.   1)      The HUs are staged to the production area (either PSA or ST 914 in WM) based on need for

  • Value Mapping Help

    I have the following table structure for which I have to create value mapping. Could you please provide me the details that how should I proceed Field X            Field Y         FieldZ 1                  Last Name               2                  F

  • Problem in showMessageDialog method of JOptionPane

    import javax.swing.*; import java.awt.*; import java.awt.event.*; public class SwingComp extends JFrame implements ActionListener{ public SwingComp() JPanel p = new JPanel(); JButton b = new JButton("OK");           b.addActionListener(this); p.add(b