12
votes
3answers
6k views

What exactly this error is?

Database i am using is MySQL 5.1. I specified, i believe, right connectionstring in my web.config. but when i run my web app. it throws this exception:- MySql.Data.MySqlClient.MySqlException: The ...
10
votes
4answers
4k views

Remote connect to clearDB heroku database

How can i perform a remote connect to ClearDB MySQL database on heroku using for example MySQL Query Browser. Where to get url, port, login and password?
10
votes
4answers
14k views

Jetty 7 + MySQL Config [java.lang.ClassNotFoundException: org.mortbay.jetty.webapp.WebAppContext]

I've been trying to get a c3p0 db connection pool configured for Jetty, but I keep getting a ClassNotFoundException: 2010-03-14 19:32:12.028:WARN::Failed startup of context ...
9
votes
2answers
714 views

PDO - real facts and best practice? [closed]

Since now I've been using the older mysql instead of PDO and I've seen many recommendations why to switch to PDO, however also many different facts (also here on SO), e.g.: stating PDO is slightly ...
8
votes
8answers
28k views

Could not connect: Lost connection to MySQL server at 'reading initial communication packet', system error: 0

I am running a Rails app so now I am trying to remote connect to mysql and I am getting this error Could not connect: Lost connection to MySQL server at 'reading initial communication packet', system ...
8
votes
3answers
1k views

MySQL Database Connection Management In PDO

I'm very new to PHP/MySQL and I'm learning things as I go. One of the newer things I've learned is that there is a maximum number of connections that can be made to a database for a given username. ...
7
votes
3answers
6k views

How to connect to mysql using mysql connector via C# without actually installing the connector

We have a dot net 2.0 based C# product which uses Mysql as the data storage. When we install the mysql connector 6.3.6 on the XP/Win 7 machine, we are able to connect to the database from the C# code ...
6
votes
6answers
546 views

Is there an database connectivity framework or library for PHP?

I wonder if there's a useful library or lightweight framework only for database connectivity. What I need is something that lets me use a MySQL database with prepared statements in a secure way, ...
6
votes
3answers
128 views

What is wrong with this Database connection string?

I am trying to connect to my remote MySQL server, using the following code. Can you tell me what I am doing wrong as the replacement of database connection info with variables doesn't seem to be ...
6
votes
3answers
1k views

Is the database connection in this class “reusable”?

I'm new to asp.net so this might be really basic question, but i cant figure it out. I found a bit of code on the internet, that connects to database. And i created a namespace and some classes to ...
6
votes
1answer
2k views

MySQL Connect via proxy in Java

I am developing a client-server software, where the client connects to the database server as follows. ... try { Class.forName("com.mysql.jdbc.Driver"); Connection conexion = ...
5
votes
7answers
2k views

How does database connection works in php-mysql

Is it better to close the connection after each query is executed or put the connection as is it, then php will automatically close that connection. Which one is better and why?
5
votes
3answers
2k views

Detect OS Sleep and Wake Up events in Java

Is there a way for a Java program to detect when the operating system is about to go to sleep, or failing that, at least detecting a wake up? The actual problem is that in a particular application a ...
5
votes
2answers
1k views

Avoiding “MySQL server has gone away” on infrequently used Python / Flask server with SQLAlchemy

How can Flask / SQLAlchemy be configured to create a new database connection if one is not present? I have an infrequently visited Python / Flask server which uses SQLAlchemy. It gets visited every ...
4
votes
2answers
253 views

Do unused mysql connections slow down scripts?

I am in the process of writing an API for my website, along with a pretty large class to process all of the API requests. Most pages, if not all all the pages on the website will send at least one ...
4
votes
4answers
20k views

Tomcat6 can't connect to MySql (The driver has not received any packets from the server)

i'm running an Apache Tomcat 6.0.20 / MySQL 5.1.37-lubuntu / sun-java6-jdk /sun-java6-jre / sun-java6-bin on my local machine using Ubuntu 9.10 as OS. I'm trying to get a simple DB-query example ...
4
votes
2answers
932 views

MySQL connection validity test in datasource : SELECT 1 or something better?

I'm setting up a failover cluster on MySQL, in a master/slave architecture. I'm also configuring my JBoss Datasource, and I'm looking for the better way to test my connection, knowing that it is for ...
4
votes
1answer
296 views

Why using RESTFul web service to populate a database is a good habit?

My question actually is in the title. I am developing an Android application which populates a distant mysql database (in an amazon cloud server). Why not using the same techniques used in java ...
4
votes
1answer
45 views

Effect of internet speed on PHP/MySQL execution

In Wordpress my client is creating large galleries (300+/- images) and using the Wordpress uploader to reorder the images. This can be by filename, or numbers can be applied and sorted ...
3
votes
2answers
1k views

Connection using ConnectionPoolDataSource

To connect my required Database. I am planning to use ConnectionPoolDataSource class. But How can i set the details regarding the database name(to which i want it to be connected) on using this ...
3
votes
5answers
2k views

Multiple database transactions on a single connection

I have a multi-threaded program whereas each thread, at the start of execution, acquires a single connection from a MySql connection pool class. The thread then uses a number of database table wrapper ...
3
votes
4answers
1k views

How to Notice Close of MySql Server in Qt

When I closed MySql server, how can I understand that mysql server is gone away from my Qt program? Edit: Here my trial: When I close MySql, I get these results, and I can't catch that MySql is ...
3
votes
2answers
91 views

PDO: connect to database server (not specific database name)

Currently I connect to database server by this @$db_connect = mysql_connect('localhost','user','xxx', true); I have to connect to database server (not specific database name) due to query with ...
3
votes
2answers
380 views

AnyEvent::DBI and database reconnection

I'm using AnyEvent::DBI in a singleton package, and when there is no activity in the database / queries etc after many hours, I get this error while trying to issue a query: DBD::mysql::st execute ...
3
votes
3answers
561 views

Tomcat Connection Pool configuration: DataSource type and “Too many connection” error

I'm using the tomcat connection pool via JNDI resources. In the context.xml: <Resource name="jdbc/mydb" auth="Container" type="javax.sql.DataSource" username="root" password="root" ...
3
votes
1answer
166 views

What is the process for using MySQL from Python in Windows?

I come from a PHP background where MySQL easily works from PHP, and don't the process for getting MySQL to work from Python. From all the research i did and reading of similar yet non-exact ...
3
votes
3answers
4k views

MySQL Connector/NET connection multiple DataReaders per Connection?

Hey guys, I'm migrating from Java to C# now that I've realized I prefer the C# language features over the ones in Java, but I have this small issue. In MySQL Connector/J and JDBC, I believe that one ...
3
votes
1answer
257 views

MySQL student database

Background School Corp. has two databases with a common table, employees. These two databases are located at the company's offices in New York and Atlanta. Client computers connect to the databases to ...
3
votes
2answers
135 views

Multiple mysql_connect statements canceling each other out

I am trying to code an ajax chat application using php and my sql. I have a file called connect.php that looks like this: mysql_connect("host", "username", "password"); mysql_select_db("database ...
3
votes
2answers
975 views

felixge/node-mysql coudn't connect to database

I installed the felixge/node-mysql via npm (npm install mysql), and now i want to connect to the mysql database, but every time I try to connect this error happens: { [Error: connect ECONNREFUSED] ...
3
votes
1answer
226 views

how to connect mysql database using port datareceived event

Currently I'm using C# code to access MySQL database in my application. I want to access the database by firing data accessing method in the port data received event.I have already written the data ...
3
votes
2answers
415 views

mysql prepared statement : Update query

I am trying to execute a C program, using mysql C API, connecting to mysql with an update query and I am not getting any compilation or linking errors , but rows are not getting updated in the db ...
3
votes
1answer
1k views

com.mysql.jdbc.exceptions.MySQLSyntaxErrorException exception in CentOS server

Running a java code in CentOS server to connect mysql My code is - String server = "", url = "", password = "", user = "", databasename = ""; Connection con = null; try { server = ...
3
votes
2answers
95 views

Getting connection error when i connect database [duplicate]

Possible Duplicate: Stumped SQL Exception for JDBC I am using Linux server. But when i establish connection in mysql server i am getting this type of exception. ...
3
votes
2answers
701 views

MySQL Socket refuses connection after thousands of successive connections

I am currently trying to populate a MySQL5.1 database on a current Ubuntu machine with >5,000,000 entries. Due to the program's architecture, for each INSERT statement a new database connection is ...
2
votes
3answers
570 views

Java newbie needs help with database connection

I'm new to Java but even newer to java database connections. I've managed to create a database connection and query a table when I put it in the Main class. Now that I've moved it into a new class ...
2
votes
2answers
775 views

sql open connection in read only mode

This question comes out of curiosity. I searched google for this but didn't get a clue. Suppose a user has full read/write access to MySQL database. I am wondering, is there any way (some parameter ...
2
votes
2answers
2k views

Error in Mysql Connection

I am using Magento ver-1.6.1. When I try to connect DB Magento through the below error. SQLSTATE[HY000] [2000] mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use ...
2
votes
1answer
4k views

How to connect to MySQL server on another host?

Django can simply connect to its own MySQL server by setting HOST and PORT in settings.py as '' (empty string): DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', # Add ...
2
votes
5answers
450 views

Using a PHP script to make a MySQL connection for a desktop application

Ok here's the thing. My webhost, which happens to be the cheapest and most reliable in my country, doesn't allow direct access to my MySQL database. I can only connect to it using "localhost" on ...
2
votes
2answers
11k views

mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication.

I am getting the following error: Database connection fialed: mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password ...
2
votes
2answers
747 views

How to tell if any MySQL connections has been dropped or timed out?

A client is using PHP to connect to MySQL. The PHP scripts and the MySQL database are located on 2 different Linux servers. He complained that database connections were being dropped or timed out and ...
2
votes
3answers
1k views

Tomcat-Mysql connections in a Connection Pool timing out after idle time

I am currently using tomcat 6 and MySQL 5.1.56. It uses Mysql Connector-j to get DB connections and use them. I have setup a connection pool as per this link. ...
2
votes
2answers
967 views

Jetty 7 + MySQL Config [java.lang.IllegalArgumentException: Object is not of type class org.eclipse.jett y.webapp.WebAppContext]

I've been trying to get a c3p0 db connection pool configured for Jetty (7.4.1.v20110513), but I keep getting a java.lang.IllegalArgumentException : C:\jetty7>java -jar start.jar 2011-05-29 ...
2
votes
2answers
890 views

How fast is Oracle database link?

I want to import data from a MySQL server into Oracle database, and I found a suggestion to use Oracle database link. The Oracle instance is 10.0.2.1, and the MySQL server instance should be 5.1. The ...
2
votes
2answers
203 views

Two db connect files

I am using one db file to connect to the database. However, i need to show something else from another db database on this site. I can't use two db connect files. So, how do i go about display one ...
2
votes
2answers
2k views

How to set autoreconnect option with mysql connector c++

Greetings, how can i set autoReconnect option with mysql connector c++ ? ( not with mysql c api http://dev.mysql.com/doc/refman/5.0/en/mysql-options.html )
2
votes
4answers
880 views

How should I manage connecting to a database using java servlets, JSP & Tomcat

I'm pretty new to Servlets and JSP and to using databases. At the moment I have a class in the 'model' part of my web app which has lots of methods that I've written to perform database queries and ...
2
votes
1answer
114 views

When should I use mysqli_kill() and mysqli_close()?

I have my own database which I'm running using Xampp. I'm using the Apache and MySql services on it, though I given public access just yet. I would like to know the proper way to end a bunch of sql ...
2
votes
1answer
993 views

Android - safest way to connect to MySQL database

I'm developping an Android app which uses the same MySQL server as a website is using. I want to connect to the database in my app, and I've done that before by placing some PHP files on the server ...

1 2 3 4 5 9
15 30 50 per page