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:[MySQL][ODBC 3.51 driver][mysqld-4.1.22-standard-log][MySQl server has gone away[Database vendor code :2006] 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
Similar Messages
-
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.
% -
"stack overflow" when trying to connect with Oracle ODBC
Hi,
I'm trying to connect to Oracle DB (8.1.7.3.0) from WinNT 4.0 SP6 with Oracle ODBC driver 8.0.6.6.0. I've been trying to connect with "Oracle ODBC Test" and with "MS Query". In either way I end up with Dr. Watson reporting about "stack overflow". Before starting to upgrade ODBC driver I wanted to ask - should these versions of driver and DB work together at all (even unofficially)? Or may I be missing some other thing? Any hints, ideas are welcome.
Regards,
Madis PriilinnThank You for replying, Justin!
Yes, I can connect successfully to the database through other tools - at the moment I tried SQL*Plus, Net8 Easy Config and Schema Manager.
The Oracle client in the NT machine is 8.0.5.0.0. And unfortunately I do not know anything about the Oracle installation on this machine and at the moment I don't have that person near me too whom to ask also. But I think the installation was ok, because the connection through ODBC was working before the DB upgrade as far as I understood (sorry, again at the moment I don't know what was the previous version of DB. I will ask that information as soon as possible).
The main problem that bothers me at the moment is that I can't install 8.1.* series OraODBC driver with 8.0.5.0.0 Oracle Installer. I managed to install 8.0.6.6.0 version of the driver, but not the newer ones. As far as I've understood I have to upgrade the whole Oracle in the NT machine to upgrade that installer. Am I correct?
Regards,
Madis Priilinn -
Problem in establishing connection with mysql 5.0
Hi,
I am using JCAPS 5.1. I tried to insert data to mysql database table.
But i got following error
java.sql.SQLException: Error in allocating a connection. Cause:
Physical Connection doesn't exist.
My intention is to read file in which data are comma seperated and to
populate those values to a mysql 5.0 database table.
Sample DATA in file [test.txt]
111,gg,23,MFG
112,hh,24,MFG
113,ii,25,RETAIL
114,jj,26,IT
Database table: employee
eno,ename,eage,edept
While creating JDBC OTD there is no problem in establishing connection with database. But after deploying i got above error.
I have used Mysql 5.0 Connector/J JDBC driver. Added JDBC driver jar files to following directories as required.
1) C:\JavaCAPS51\logicalhost\is\lib
2)C:\JavaCAPS51\logicalhost\is\domains\test\lib
Steps i have followed as per JDBC-ODBC -eway user guide doc.
1) Created USerDefined OTD and added necessary fields
2) Created JDBC OTD.
3) Created JAVA collaboration and do business process for inserting
4) Mapped all components by creating in Connectivity MAp
5) created necessary external systems in envrionment explorer.[JDBC External System and File External System]
6)Created Deployment profile
5) Deployed it.
After deploying it gives error as
java.sql.SQLException: Error in allocating a connection. Cause: Physical Connection doesn't exist
Please let me know the solution for problem.
Message was edited by:
VenkateshSampoornamIn the environment definition,
-> External Application JDBC
-> Properties
-> Outbound JDBC Connection
You have the database URL in the "DriverProperties" field
Valid URL would be : jdbc:mysql://localhost:3306/caps
!! The doc says that this field is optional !! Seems to be an error in the doc:
Hope this helps
Seb -
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 AlokHi
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 -
Crystal Report on Universe with MySQL ODBC
Hi
I created a report with Crystal reports by using a Universe based on MySQL ODBC. In my local (Windows XP) installed Report Designer everything is running fine. I'm also able to publish this report to my BOE, based on RHEL.
If I will refresh my report on InfoView, database credential are required, but my credential are not accepted. I only become a error message: Failed to open the connection
If I use Webi with the same universe and the same connection, everything is fine.
I have also change the ODBC version, but no other result.
Any idea, where I can trace this connection?
Versions:
Crystal Reports 2008 (12.0.0.683)
Business Objects Enterprise 3.0 (12.0.0.683)
MySQL ODBC 3.51.27 and 5.1.5
Thanks a lot
ChristophHi,
thank you very much for reply.
I think you got it. We have the goal to create a report that can be printed and is top-gloss-report for management ; ) One query would not be able to include all that stuff. It is very different.
So we created 7 different queries in SAP BW Query Designer and we want to put them together in BO Crystal Reports.
All Queries work with input variable for period and year. These input variables are used in the columns of the queries for calculating the key figures.
So, if we put these queries together into Crystal Reports, we should actually use "replacement path" for variables. But the sap.help says, that isn't doable. -
hello
how can i create a connection to mysql and postgresql databases in jdbc. without using odbc.
thanks.You need to use a different driver. I assume you're using the jdbc-odbc bridge driver.
For mysql, get the mm.mysql driver at http://mmmysql.sourceforge.net/
For postgresql, go to http://jdbc.postgresql.org/
I've only used the mysql driver, so I don't know the details of how to use the postgresql one.
In general, you will have to do the following:
1. download the jar file and put it in your classpath
2. change the connection url string to conform with the format in the driver documentation. -
Problem with USERNAME & PASSWORD creation--JDBC connection with MYSQL
How to connect to JDBC with Mysql Connector
i installed mysql & created table, it works fine
During Password---> I gave it as tiger , no username
i installed mysql connector
i saved the .jar file path in class path
HOW TO CREATE USERNAME & PASSWORD & DATASOURCE NAME ---> Is it the password -tiger or something else like (ADMinstrative tools-ODBC-services--etc )
Pl, help,
tks
XxHow to connect to JDBC with Mysql Connector
i installed mysql & created table, it works fine
During Password---> I gave it as tiger , no usernameTiger? This ain't Oracle.
I think you should give a username and password. How can it look up a password without a username? Better GRANT the right permissions, too.
Read the MySQL docs a bit more closely. Your path isn't the way to go.
% -
Connectivity with MySQL in Windows
How can I connect JSP with MySQL in Windows?
I Tried out the following code but It did not work
Class.forName("org.gjt.mm.mysql.Driver");
Connection cn = DriverManager.getConnection("jdbc:mysql:///test");
I think you missed the IP address for your MySQL server machine.
If it's on the same computer, try this:
jdbc:mysql://localhost/test
"John Jacob" <[email protected]> wrote in message
news:[email protected]..
> How can I connect JSP with MySQL in Windows?
> I Tried out the following code but It did not work
>
> Class.forName("org.gjt.mm.mysql.Driver");
> Connection cn = DriverManager.getConnection("jdbc:mysql:///test");
-
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_64The 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 -
Create a simple connection with mysql
hello
my name is edvanio i am from brazil.
i'd like to connect one program in Java with mysql for insert, delete and update one simple base ex. teste with nome and fone.
thank , byehere's a couple of sites
http://www.javacoding.net/articles/technical/java-mysql.html
http://www.developer.com/java/data/article.php/3417381
I recently installed MySQL (just to see if I could get a working program to run)
these were the steps
1. downloaded MySQL
2. downloaded the connector file
3. unzipped/installed MySQL
4. unzipped the connector file
mysql-connector-java-3.0.17-ga-bin.jar
copied the jar file into this directory
C:\Program Files\Java\jdk1.5.0_03\jre\lib\ext
5. opened MySQL, using the code from Gamelan
create the db JunkDB
created the user, permissions, password
6. combined the code from both sites (code follows)
and it worked OK
import java.sql.*;
class MySQL_Test
public MySQL_Test() throws Exception
testDriver();
Connection con = getConnection();
executeUpdate(con,"CREATE TABLE test(id int,text varchar(20))");
executeUpdate(con,"insert into test(id,text) values (1,'first entry')");
executeUpdate(con,"insert into test(id,text) values (2,'second entry')");
executeUpdate(con,"insert into test(id,text) values (3,'third entry')");
executeQuery(con,"select * from test");
executeUpdate(con,"drop table test");
con.close();
protected void testDriver() throws Exception
try
Class.forName("com.mysql.jdbc.Driver");
System.out.println("MySQL Driver found");
catch(ClassNotFoundException cnfe)
System.out.println("OOPs - MySQL Driver nowhere to be found");
throw (cnfe);
protected Connection getConnection() throws Exception
String url = "";
try
url = "jdbc:mysql://localhost:3306/JunkDB";
Connection con = DriverManager.getConnection(url,"auser","drowssap");
System.out.println("Connection OK");
return con;
catch(SQLException sqle)
System.out.println("OOPs - No Connection");
throw (sqle);
protected void executeUpdate(Connection con,String sqlStatement) throws Exception
try
Statement s = con.createStatement();
s.execute(sqlStatement);
s.close();
catch(SQLException sqle)
System.out.println("OOPs - error executing statement");
throw (sqle);
protected void executeQuery(Connection con,String sqlStatement) throws Exception
try
Statement s = con.createStatement();
ResultSet rs = s.executeQuery(sqlStatement);
while(rs.next())
String id = (rs.getObject("id").toString());
String text = (rs.getObject("text").toString());
System.out.println("Found record "+id+" "+text);
rs.close();
catch(SQLException sqle)
System.out.println("OOPs - error executing resultset");
throw (sqle);
public static void main(String[] args)
try
new MySQL_Test();
catch(Exception e){e.printStackTrace();}
} -
Create database connection with Mysql
Hi, all:
inside JDeveloper, i try to create a database connection for Mysql (third party
JDBC driver). I input all needed parameters into
JDeveloper database connection dialog, and test connection, the error message
says 'Unable to find driver org.gjt.mm.mysql.Driver". The jar file contains driver
is listed in system classpath, and Mysql and MM-Mysql JDBC driver are tested with
other applications and there is no problem.
So, what i should do to create such a connection ??
Any help will be appreciated. thank you in advance.
kevin.The connectio URL could look like this:
(leave the User-, Password-, and Role-fields, in the tab before, empty)
Java Class Name: org.gjt.mm.mysql.Driver
URL: jdbc:mysql://localhost:3306/test?ultradevhack=true&?user=myuser&?password=mypassword -
hi master
sir i am use studio creator now i install the mysql5
sir please give me idea how i connect my studio creator with mysql 5
thank
aamirhi
follow the following steps:
1) Download Jconnector Driver for java from www.mysql.com
2) Open the creator , from servers palette select data source and right click.
3) choose new data source , click new
4) select the jar file u downloaded from the web site.
5)clicj suggeste ( this will make the creator to select connections statments automatailcly )
6) put the username and password and click ok
this will make a datasource with mysql server.
be sure that the mysql server is run,, and make sure that u apply right username and password
Hope this will help
Good luck
Mohammed -
Jar file connection with mysql
Hello everyone i ve a problem if you people could solve please help...
When i compile my java code with mysql connection it works perfectly, but when i convert into jar file its not updating any values in the mysql database
Can anyone tell me a solution.subhavenkatesh wrote:
Can anyone tell me a solution.You have a bug. Find it. Fix it. -
Jakarta-tomcat-3.3.2 connection with mysql-4.1.12a-win32
how do i connect to mysql using tomcat?
i've set the class path = ".;D:\j2sdk1.4.2_08\jre\lib\ext\mysql-connector-java-3.1.10-bin.jar;"
without quotes
i've copy the mysql-connector-java mysql-connector-java-3.1.10-bin.jar into the mentioned directory = "D:\j2sdk1.4.2_08\jre\lib\ext\"
and my computer's mysql 's service is starting since my computer restart [i've checked it by right click desktop toolbar->Task Manager->Processes->mysqld-nt.exe..
and i've used the code from :
http://www.stardeveloper.com/articles/display.html?article=2003090201&page=4
to test if my connection is active, my JdbcExample1.java file is located at D:\jakarta-tomcat-3.3.2\webapps\ROOT\WEB-INF\classes\com\example, so my source code is :
package com.example;
import java.sql.*;
public class JdbcExample1 {
public static void main(String args[]) {
Connection con = null;
try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
con = DriverManager.getConnection("jdbc:mysql:///test", "root", "nothing");
if(!con.isClosed())
System.out.println("Successfully connected to MySQL server...");
} catch(Exception e) {
System.err.println("Exception: " + e.getMessage());
} finally {
try {
if(con != null)
con.close();
} catch(SQLException e) {}
when i compile the file using javac, it's fine, when i run it using java, it shows me this error:
Exception in thread "main" java.lang.NoClassDefFoundError: JdbcExample1 (wrong n
ame: com/example/JdbcExample1)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
3)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
what have i missed out? anyone can u please help me? is my coding or setting in-accurate? thanks for reviewing my topics tooI'm not sure why you have mentioned Tomcat, but you need to run the class with something like:
java -classpath .;D:\j2sdk1.4.2_08\jre\lib\ext\mysql-connector-java-3.1.10-bin.jar com.example.JdbcExample1If you've correctly set the CLASSPATH environment variable then you can leave out the -classpath command line argument. Notice that you must specify the package of the class too.
To compile this all correctly, you should do something like:
mkdir classes
javac -d classes JdbcExample1.javaand then run with
java -classpath classes;D:\j2sdk1.4.2_08\jre\lib\ext\mysql-connector-java-3.1.10-bin.jar com.example.JdbcExample1
Maybe you are looking for
-
10.6.5 update causing network issues
Variations of this have already been posted but when I described my particular issues to Apple support the advice was roll back to 10.6.4! I have 3 Macs, and this only appears to be affecting my MBP 13". Updating to 10.6.5 causes: - ethernet to stop
-
Copy of a standard sapscritp to a Z
Hi; I have this problem, in development mandant i´m trying to copy a standard sapscript to a Z.. F140_CASH-_DOC_01 to Z140_CASH_DOC_01. i did this: 1) place the name Z140_CASH_DOC_01 2) click in Create 3) then FORM -> TAKE 4) place the name F140_CASH
-
How to change Approval mail title
Dear all, I want to change approval sc mail title. So I changed Task 10008126. basic data-->work item text.. but still is old text after I get notification of shopping cart approval of email .who can tell me...how to active new text? Thanks a lot. Al
-
Earlywatch Alert configuration for Java system
Hi All, I have configured the Solution manager diagnostics for early watch alerts for a java system by following the guide "EWA for non-ABAP components" in note 976054. I am able to get the EWA reports manually, i.e by downloading the "service downlo
-
39L4333DG CloudTV: I don't understand! Guide needed
Hello, I just set up my new TV, I think it's great (apart from being too slow), but I don't understand how to use the CloudTV. My TV came with NO manuals: it only included a quick setup guide and a brief Cloud TV description. I've been able to downlo