MySQL ODBC Connection

Hi all,
Can anyone please let me know how to make ODBC Connection with MySql in JSP.
Steps wise explanation will be highly appreciated.
thanks for any help in advance,
savdeep.

Why you go for ODBC, better to use JDBC connection.
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection connection = DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/databasename", User, Pass);

Similar Messages

  • CR2008:  MySQL ODBC Connection duplicating FROM statement in SQL Expression

    Maybe I'm doing something wrong here, but I think maybe I'm not and that I've found a bug.
    I'm doing a very simple select statement:
    SELECT count(*)
    FROM labtech.computers
    WHERE os NOT LIKE %server%
    When I do this statement, I get an error:
    Crystal Reports
    Error in compiling SQL Expression :
    Database Connector Error: '42000:[MySQL][ODBC 5.1 Driver][mysqld-5.1.37-community]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT count(*)
    FROM labtech.computers
    WHERE os NOT LIKE %server% FROM `labtec' at line 1 [Database Vendor Code: 1064 ]'.
    OK  
    There is nothing wrong with this sql statement, so I started digging a little, removing everything except for
    Select *
    Crystal Reports
    Error in compiling SQL Expression :
    Database Connector Error: '42000:[MySQL][ODBC 5.1 Driver][mysqld-5.1.37-community]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT *
    FROM `labtech`.`clients` `clients1`' at line 1 [Database Vendor Code: 1064 ]'.
    OK  
    You will see that it is adding the 
    FROM `labtech`.`clients` `clients1`
    So, my questions is:
    1) Is this an issue with CR2008 or the MySQL ODBC driver
    2) If it's CR2008, how do I report it?
    3) Can anybody else duplicate it?
    Thanks in advance for any help.
    -Scott

    Hi Scott,
    Lots of info in these forums, more info in the [Crystal Report Designer|SAP Crystal Reports; forum. If you search in there you'll find references to others who suggested training material. You can also click on the eLearning tab above and find more info...
    Thank you
    Don

  • MySQL ODBC Setup

    Post Author: Andrewr
    CA Forum: Data Connectivity and SQL
    Greetings,
    I have a question as to how to get my ODBC connection setup.
    I have XP and a Mysql DB running on a Linux Server, on my XP machine I am using the Mysql ODBC Connection tool. I have tried both the 3.51.23 and the new 5.xxxx versions of this tool.
    I know that my username and password are correct in the setup.
    Whenever I try to setup the ODBC I get the error " Request Returned SQL_ERROR"
    [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on '192.168.0.197' (10061)
    My XP Firewall is disabled.
    Does anybody happen to have any suggestions?
    Thank you
    Andrew
    Edit: I should probably add - that I am trying to generate reports with Crystal.
    Thanks

    Post Author: Andrewr
    CA Forum: Data Connectivity and SQL
    Well - Problem is not solved yet, but I think I have it figured out.
    When I log into my Linux server, and telnet to port 3306 I get a connection, so I know that Mysql is answering.
    When I try to telnet to the server on 3306 from my windows machine, I get nothing.
    So this leads me to believe that it is a firewall issue. Even though both the WS & Server's firewalls are disabled, I do have a dedicated firewall/DHCP server on the fringes of my network. I suspect that this may be the issue. All the hostnames for all machines are correctly located in the respective hosts files. So I know that is not the issue. Just gotta setup the correct rule for the firewall - I hope.
    Thanks
    Andrew

  • Adobe LiveCycle Designer ES Error while Connecting to MYSQL ODBC Driver

    Hi
    I'm getting an strange error message when i try to connect a LC PDF form to
    MYSQL DB using MySQL Connector /ODBC 3.51 Driver
    Here is the complete detail how i was trying to build a connection
    string :-
    I Opened a form in Adobe LiveCycle Designer ES2 Ver.9.0.0
    Clicked on Data View Pallete --> New Data Connection --> selected OLEDB Database radio button --> Build a Connection string (clicked on build button) --> selected MS OLE DB Provider for ODBC Drivers (the default selected option ) --> clicked on Next >> button --> Use connection string (radio button) --> Build connection string on clicking Build button --> Select Data Source windows opens --> Clicked on Machine Data Source tab --> created a new data source (with User Data Source) --> Selected the MySQL ODBC Driver (MySQL ODBC 3.51 Driver) --> Clicked on next button and then Finish
    A Connector/ ODBC 3.51.28 - Add Data Source Name window opens up which have the DSN connection details (DSN Name , Server , user , password , database).
    I put all the default details
    After this i got a error message saying that
    Adobe LiveCycle Designer ES has encountered a problem and needs to
    close. we are sorry for the inconvenience
    I tried this number of time and was getting this error message every
    time i try to put the DSN Detail and trying to connect to the DB. This
    was really irritating.
    Can somebody's what's the Issue . Is this a Resource Conflict or
    something else
    P.S :- I am using Adobe LiveCycle Designer ES2 Ver.9.0.0 with Windows XP and MySQL
    Connector /ODBC 3.51 and the DB Connection is working good for MS
    Access( though i don't need MySQL Connector fot this ).
    Any Help would be highly appreciated
    Thanks Alok

    Hi
    I'm getting an strange error message when i try to connect a LC PDF form to
    MYSQL DB using MySQL Connector /ODBC 3.51 Driver
    Here is the complete detail how i was trying to build a connection
    string :-
    I Opened a form in Adobe LiveCycle Designer ES2 Ver.9.0.0
    Clicked on Data View Pallete --> New Data Connection --> selected OLEDB Database radio button --> Build a Connection string (clicked on build button) --> selected MS OLE DB Provider for ODBC Drivers (the default selected option ) --> clicked on Next >> button --> Use connection string (radio button) --> Build connection string on clicking Build button --> Select Data Source windows opens --> Clicked on Machine Data Source tab --> created a new data source (with User Data Source) --> Selected the MySQL ODBC Driver (MySQL ODBC 3.51 Driver) --> Clicked on next button and then Finish
    A Connector/ ODBC 3.51.28 - Add Data Source Name window opens up which have the DSN connection details (DSN Name , Server , user , password , database).
    I put all the default details
    After this i got a error message saying that
    Adobe LiveCycle Designer ES has encountered a problem and needs to
    close. we are sorry for the inconvenience
    I tried this number of time and was getting this error message every
    time i try to put the DSN Detail and trying to connect to the DB. This
    was really irritating.
    Can somebody's what's the Issue . Is this a Resource Conflict or
    something else
    P.S :- I am using Adobe LiveCycle Designer ES2 Ver.9.0.0 with Windows XP and MySQL
    Connector /ODBC 3.51 and the DB Connection is working good for MS
    Access( though i don't need MySQL Connector fot this ).
    Any Help would be highly appreciated
    Thanks Alok

  • ODBC connect from Oracle to MySQL!

    Dear All,
    I know its not very much related to the subject of this forum but DBA's often have to perform such tasks.
    I am in process of developing replication between Oracle and MySQL. For this I have planned to create materialized views in oracle that query MySQL database.
    I am using Oracle 11gR1 on Linux for Oracle Server and MySQL is on windows based server version is 5.1.
    I am stuck at the very first step that is to create a database link between Oracle and MySQL.
    On Oracle's server, I did the following:
    Installed unixODBC rpm (Installed successfully)
    Installed mysql-connector-odbc (Installed successfully)
    when i write this command odbcinst -j it gives the following information
    unixODBC 2.2.11
    D|RIVER........... : /etc/odbcinst.ini ; (my comments : Files exists)
    SYSTEM DATA SOURCE : /etc/odbc.ini (my comments : File exists )
    USER DATA SOURCE : /root/.odbc.ini (my comments : File DO NOT exists)
    Now i tried to add the following entry in the file /etc/odbc.ini
    [bssdata]
    Driver = MySQL ODBC 3.51 Driver
    DATABASE = bssdata
    DESCRIPTION = views_on_bssdata
    PWD =
    PORT = 3306
    SERVER = 192.168.0.68
    UID = root
    Now when i try to check the connectivity with the command:
    isql -v bssdata root
    Error: data source name not found, and no default driver specified.
    ERROR: Could not SQLConnect
    Anyone have tried this before, please help me out of it.
    Regards, Imran

    Hope these links help you :
    http://www.pythian.com/news/1554/how-to-access-mysql-from-oracle-with-odbc-and-sql/
    http://sysinfo.bascomp.org/2008/03/setting-oracle-heterogenous-service-mysql-to-oracle/
    http://www.idevelopment.info/data/Oracle/DBA_tips/Heterogeneous_Services/HETERO_2.shtml
    http://www.dba-oracle.com/t_heterogeneous_database_connections_sql_server.htm
    Regards
    Rajesh

  • DAS Can't connect to mySQL ODBC

    Using:<BR>HPS 8.3<BR>Sun Solaris 8<BR>I've created a BQY in Intelligence Explorer that connects using mySQL ODBC in Windows XP and wanted to publish it to the web, but I needed to publish the OCE to the server and set it up with DAS.<BR><BR>Here are the steps I took<BR>1. Installed the mysql connector odbc 3.51.12 sun solaris2.8 sparc 64bit ODBC in Solaris.<BR>2. Created an odbc.ini file in Solaris with my mySQL connection settings in the home directory of the user running the services. I even made a copy of it in the $BP_HOME directory.<BR>3. Added the library path for my ODBC library to all my scripts.<BR>4. Added the data source using the service config tool.<BR>5. Restarted services<BR>6. published the OCE and BQY<BR><BR>When I access the BQY using the plug-in, it gives me <BR>"Server Error [2009]; Internal Error Detected in Data Access Service"<BR><BR>When I access it using the thin-client (iHTML), it gives me:<BR>"An Intelligence Service error has occurred.-Failed to acquire requested service"<BR><BR>What else needs to be done?<BR>I tried some the other suggestions to no avail:<BR>--added the library path  to the LD_PRELOAD variable in the $BP_HOME/bin/services.sh script<BR><BR>Also, I noticed that when I ran ServiceConfig.sh, there were no data sources to pick from the dropdown.  Anyone know how to make that active so I can just PICK the connection to use?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    I'd strongly recommend that you take all that JDBC code out of your JSP. Put it into a class that you can test on the command line. Once you have it working, you can use it to get at data and pass it along to your JSP for display.
    I'd also recommend that you not use scriptlets and learn JSTL right away. MVC separation suggests that putting Java code in a JSP is a very bad idea.
    %

  • ODBC Connectivity with Crystal Reports 2009 and MySQL

    Hi,
    I'm hoping someone can help me. We are currently running Crystal Reports CR Developer version 9.2.2.693 with an ODBC connection (ODBC 3.51 driver) to a My SQL database, version 4.0.18.*
    We want to upgrade to Crystal Reports 2008, CR Developer version 12.0.0.683, however when I try to run reports to the current database, I get the following error:
    *Database Connector Error: 2300:[MySQL][ODBC 3.51 Driver][mysqld-4.0.18-nt]You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near  .client where 0=1  at line 1 [Database Vendor Code: 1064] *
    Has anyone encoutered this before? Do I need to get a different rev. ODBC driver? Thanks in advance for your help.

    Thanks for your suggestion, but since the same query works when I use Crytal Reports 9 to the same MySQL database, I don't think that's the issue. I wonder if it has to do with the driver.

  • Connection with MYSQL ODBC

    Post Author: wrkwinter
    CA Forum: Data Connectivity and SQL
    Hi,   I am having problem with conecting Crystal Report XI to the MYSQL Server. I am using Mysql Connector/ODBC 3.51. I configured ODBC connection . Once i connect to MYSQL server thru Crystal Rpeort Everything works fine but after 5-10 minutes if i refresh the report I get following error.
    "Failed to retrieve data from the database"DetailsHY000:&#91;MySQL&#93;&#91;ODBC 3.51 driver&#93;&#91;mysqld-4.1.22-standard-log&#93;&#91;MySQl server has gone away&#91;Database vendor code :2006&#93; and if i log off and relog on to database everything works fine like for another 5-10 minutes and after that same ERROR  But if i use MYSQL Query Browser to connect to the database. I don't have any problem like that.  Can please explain any reason for that.....Thanks

    Post Author: synapsevampire
    CA Forum: Data Connectivity and SQL
    Check out:
    http://www.mysqltalk.org/server-has-gone-away-vt158777.html
    I'd guess that you're timing out or exceeding the number of connections.
    -k

  • Hi, i am trying to open and view a report that comes from another server with different odbc connection

    hi, i am trying to open and view a report that comes from another server with different odbc connection
    i created a crystal report for a mysql database on my machine and everything works great
    but we have other reports that come from other machines with different odbc connection
    and this its not working when opens the report asks for credentials
    and i cannot use the remote ip for these reports that come from other machine
    question
    if i cannot connect to remote ip to open the report
    for each report i have to create a database the report database on my machine and then open the report ?
    or there is some other way to open the report ?
    i am using visual studio 2013 and mysql and
       <add key="MYSQLODBCDRIVER" value="{MySQL ODBC 5.3 UNICODE Driver}"/>
    thanks

    short
    i have a report that it was created on another server with a specific dsn
    now i am trying to open the report on my machine
    the database from the other server does not exist on my machine
    the server machine where the report was created the ip its not accessible
    question ?
    can i open the report on my machine or its impossible ?
    thanks

  • Visio Database Wizard fails - ODBC connection to MS SQL

    When I try to create an ODBC connection in Visio's 2010's Database wizard I get the error: "Cannot set the database context information. Additional error information:ODBC Error: s1009. Database cxweba does not exist."
    Note that the database name is cxwebapp_bkk. I get the same error if I connect to any database on that server, and it always truncates the name in the error message (if that is a hint to the error). 
    Using Visio 2013, after connecting to the database: when I select the database object I get the error message:  "The selected table has only one field or contains no definition information. The Database Wizard requires a minimum of one key field
    and one additional data field."
    I have this problem using both SQL Server driver (6.02.9200.116384 and SQL Server Native Client 11.0 (2011.1102.2100.60).
    I do not have this problem connecting to a MYSQL database with either version of Visio, nor do I have this problem when I link link to the same SQL database in a drawing and link shapes in that drawing using the "Link Data to Shapes" under the
    Data tab.

    Hello,
    What's the version of the SQL Server instance you connect to? It seems that the Database Wizard in Visio 2010 not work well with the Microsoft SQL Server ODBC driver. Did you try to use the Generic OLEDB Provider for SQL Server?
    Since the issue is more related to office Visio, please post the question in the following forum. More experts there will assist you:
    Visio General Questions and Answers for IT Professionals
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Report Designer odbc connection string for data source using a parameter

    I am using stand alone report designer 3 for the present and have a question/problem regarding the odbc connection string for MySQL when setting up the data-source
    I need to be able to enter a parameter which is the database name i.e. BOE-201401 or say BOE-201312 etc  from a list of databases the user can choose from.
    at present the odbc connection string points to BOE-201402
    the connection string is at present  Dsn=Development Server for MYsql;description=MYSQL;server=ldndw01;database=BOE-201402;port=3306
    my parameter has the name BOE_DATABASE
    and in an expression it is  as such
    =Parameters!BOE_DATABASE.Value
    I want to point the datasource for the report to the parameter value before the user sees the report.

    Hi Leslie,
    Based on your description, we want to design a report with a dynamic DataSource connection string. There are the basic steps below for your reference:
    Create report with static database.
    Change data source to report parameter.
    Send new database connection string as a report parameter. 
    More detail information, please refer to the following blog: Dynamic Database in SSRS 2008.
    http://haseebmukhtar.wordpress.com/2011/11/09/dynamic-database-in-ssrs-2008/
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • Crystal Reports Server 2008 (Linux) - Crystal Reports/MySQL/ODBC Issue

    Hello,
    I have successfully installed CRS '08 on a Red Hat Enterprise Linux 4 server.  All services run fine.
    In the CMC, I have uploaded a Crystal Report that connect to a remote MySQL server. 
    I have installed the My SQL ODBC 3.51.11 and .12 Drivers as a System DSN.
    I have proven that the reports run fine in Crystal Reports 2008 directly against the remote MySQL DB server.
    (in Windows but with the same 3.51 ODBC Drivers)
    I have also proven that the database connection works okay from the CRS '08 Red Hat server to the remote MySQL DB server, when also creating a system DSN (using bash ./ODBCConfig)
    The problem is that when I log into the CMC or InfoView, and when I run the Crystal Reports from there, I get an error message:
    "Error in File <MyCrystalReport>: Failed to load database information"
    Is there something wrong with my specific Crystal Reports' Database Configuration? (Right click- Database Configuration)
    I see the driver was registered correctly in the /etc/odbc.ini file
    Am I supposed to set any other ODBC environment variables?
    Is there are firewall issue (port 3306 is already open)?
    In summary, the install was successful, and Crystal Reports can be uploaded and viewed via CMC or InfoView, but I cannot run the Crystal Reports against the database.
    Please advise, Thanks!

    Hi, I'm facing a similar problem. My ODBC DSN never works with CRS. Here are the details:<br><br>
    (1) I  installed the CRS 2008 in /opt/crystalreportsserver_2008_v1/ on a Linux platform. The CRS works well. I created a report with Crystal Reports 2008. This report directly connects to a MySQL server. After I published the report and manually modify its database configuration, I can browse it from InfoView. I'm sure that CRS, MySQL, and a report connecting to MySQL are all good.<br><br>
    (2) Then, I created an ODBC DSN on a Windows platform. This DSN connects to a MySQL server. I created another report with Crystal Reports using this DSN. The report can show the data within Crystal Reports.<br><br>
    (3) Then, I published the second report to CRS, but when I try to browse it, I always get such a message: Failed to open the connection.<br><br>
    I have configured the ODBC for CRS on the Linux server and I think the configuration is correct. This is how I do that: I edited the /opt/crystalreportsserver_2008_v1/bobje/odbc.ini file. In the file I added a data source called ods_telstar. Following is the content of the file:<br><br>
    [ODBC Data Sources]<br><
    CRSQLServerWP=DataDirect 5.3 SQLServer Wire Protocol Driver<br>
    CRSybaseWP=DataDirect 5.3 Sybase Wire Protocol Driver<br>
    CRText=DataDirect 5.3 Text Driver<br>
    %SYBASEDSN%=DataDirect 5.3 Sybase Wire Protocol Driver<br>
    ods_telstar = MySQL<br>
    <br>
    ... <br>
    <br>
    [ods_telstar]<br>
    Description     = ODS on telstar<br>
    Trace       = Off<br>
    TraceFile   = stderr<br>
    Driver      = /opt/crystalreportsserver_2008_v1/bobje/enterprise120/linux_x86/odbc/lib/libmyodbc5.so<br>
    SERVER      = xxx<br>
    USER        = xxx<br>
    PASSWORD    = xxx<br>
    PORT        = 3306<br>
    DATABASE    = ods<br>
    <br>
    In the middle I removed some data source definitions that are by default in the file. Note that I use "xxx" to replace the server name, user, and password. Such information is for internal use and I'm sure the original information is correct. The MySQL ODBC driver file has been put in the correct location. Correct access permissions has been assigned to the file.<br><br>
    I've tried to restart the CRS server, but still the report using ODBC DSN cannot be viewed.<br><br>
    The reason that we want to user ODBC DSN is that we may have many reports to publish. When we design the reports, we specify that they get data through an ODBC DSN such as ods_telstar. If we configure the same DSN on CRS, then we don't need manually modify each report's configuration after we publish them. If these reports are directly connecting to MySQL, then we have to manually modify each one's database configuration after we publish them.<br><br>
    I've no idea what's wrong with all the setup. Any suggestions and comments are appreciated!<br>

  • OBIEE 10.1.3.4.1 & MySQL ODBC on linux.  Generated SQL is wrong.

    Anyone know how to fix this situation?
    We are running OBIEE 10.1.3.4.1 on Redhat Linux 5.3 with MySQL ODBC connector.
    When connecting to MySQL we have need to connect to multiple databases.
    Problem is that OBIEE is generating incorrect sql.
    Example:
    select * from db_name..table_name;
    Note the two dots between db and table.
    This is incorrect syntax for MySQL. Should be only 1 dot.
    But I can't find a way to get OBIEE to only use 1 dot.

    MySQL is not a supported Datasource.
    http://download.oracle.com/docs/cd/E10415_01/doc/bi.1013/e10417.pdf

  • Problems with MySQL ODBC install on Linux

    Oracle 11gR2
    Linux 6.3
    I am using the Oracle ODBC Gateway and trying to configure for connectivity to MySQL.
    Can anyone forward me:
    (1) link to MySQL ODBC Driver
    (2) instructions on how to install
    I have tried installing the following and I am getting dependency errors:
    [root]# rpm -ivh  mysql-connector-odbc-5.1.10-1.x86_64.rpm
    Preparing...                ########################################### [100%]
       1:mysql-connector-odbc   ########################################### [100%]
    myodbc-installer: symbol lookup error: myodbc-installer: undefined symbol: SQLInstallDriverEx
    error: %post(mysql-connector-odbc-5.1.10-1.x86_64) scriptlet failed, exit status 127
    [root]# rpm -ivh mysql-connector-odbc-5.2.6-1.el6.x86_64.rpm
    error: Failed dependencies:
            libodbc.so.2()(64bit) is needed by mysql-connector-odbc-5.2.6-1.el6.x86_64
            libodbcinst.so.2()(64bit) is needed by mysql-connector-odbc-5.2.6-1.el6.x86_64
            rpmlib(FileDigests) <= 4.6.0-1 is needed by mysql-connector-odbc-5.2.6-1.el6.x86_64
            rpmlib(PayloadIsXz) <= 5.2-1 is needed by mysql-connector-odbc-5.2.6-1.el6.x86_64

    The MySQl ODBC driver requires an ODBC Driver Manager (libodbc.so.2). So please make sure you first install an ODBC Driver manager (for example unixODBC Driver Manager release 2.3) using an RPM or compile it from the soiurce files (www.unixODBC.org).
    - Klaus

  • How to use ODBC connection specified on Linux containing Oracle BI EE 11g on BI Administration?

    I have Oracle BI server (OBIEE 11g) installed on a Linux machine. I want to use a MySQL database running on same machine for reporting. I need to create Subject Area from the MySQL database.
    However, I am having problem creating connection pool from the MySQL database. BI Administration runs only on Windows and I can't see ODBC connections on Linux even when I opened BI from Linux in online mode in BI Administration. I have created ODBC on Windows, but it's giving me a "Failed to perform requested action" when trying to import metadata.
    For the record, everything works fine when everything is installed on Windows.

    check this Setting Up Data Sources on Linux and UNIX

Maybe you are looking for

  • Shipping Point Determination for Sub contracting Process

    Dear Experts, While processing the GR for a Sub Contract Purchase Order, we are getting an Error  'VL 100 - Shipping Point XXX doesn't exists' However, I am not understanding where from this Shipping point is picked. Checked the Shipping point determ

  • IE displays spry submenus (incorrectly) at top of screen

    I apologize for asking this question, as it looks like it has been asked before, but I've spent hours trying to get my spry navigation bar to display correctly in Internet Explorer with no luck.  My project for school is due tomorrow and this is the

  • Cant use mac without a mouse

    My mouse has just died on me, and its going to be a while till i can afford to get another. I've tried to use the mac using keyboard shortcuts but cant get any where i need to go. Ive printed off the support from apple but one problem remains, i cant

  • Why is my AirPort RSSI a minus number?

    Just curious.  My RSSI reading is -80 - obtained by Optoin>Clicking the AirPort icon at the top of the screen. How am I to interpret this number and why is it in minus territory?  Strong, weak?  What is optimal?  What is a good range? Thanks to anyon

  • How to start learning BW

    Can anyone suggest me how to start learning BW Reporting. in a better way. Can list the topics.