top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

connection issue with mysql

+1 vote

I have 2 mysql 5.0.45 installations on one RHEL server. One live mysqld is setup in what appears to be a relatively standard installation, port 3306, user 'mysql', etc. I've set up the other mysqld to run tests on a non-standard port 5045, user 'testsql', different data root, config, logs, etc.

When I attempt to connect to the mysqld running on port 5045 from the command-line mysql client on the same host as follows ...

# mysql -P 5045

... it seems I'm actually connecting to the live server on 3306 because 'show databases' shows the live databases. How can I troubleshoot this best?

posted Aug 9, 2013 by Deepak Dasgupta

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

add -h127.0.0.1

# mysql -P5045 -h127.0.0.1
answer Aug 9, 2013 by Abhay Kulkarni
Similar Questions
+2 votes

I try to run on my Tomcat 7 on Ubuntu 12.04 with OpenJDK.

I have installed Tomcat with apt-get and also I have installed the libmysql-java package. On starting Tomcat it reports on a stacktrace log, that the mySQL connector is not found (java.lang.ClassNotFoundException: "com.mysql.jdbc.Driver").

So I have try to create a symlink in Tomcats lib dir to the jar file and try to modify the properties of the search paths:


The JDBC mySQL Jar is stored under /usr/share/java with two symlinks, I have tried to create a symlink from Tomcats lib dir (/usr/share/tomcat7/lib) to ../../java/mysql.jar but the mySQL is also not loaded. The CATALINA_HOME is set to /usr/share/tomcat7 and the CATALINA_BASE is /var/lib/tomcat7, so imho it should be worked.

How can I create a working IceScrum with mySQL and a shared mySQL connector?

+2 votes

With Tomcat 7.0.40 version, we are using Tomcat DBCP for pooling connections.

We are able to pool connections for different aliases. But for one alias, connections are not pooling. The user and password is good because the same alias in apache dbcp works fine.

Why are we not able to pool any connections here?

+1 vote

I would like to configure the Netfilter to limit the number of connections of a "certain type". The connlimit match does not seem to meet my needs. From the man page,

"... Allows you to restrict the number of parallel connections to a server per client IP address (or client address block). ..."

the connlimit match counts the connection to a server (a single destination IP, I suppose) from an IP address (client IP) or client address block.

I would rather count (and limit) the number of connections based on my own classification. For example, I would like to limit the number of connection from IPs in a given subnet and directed to IPs in another
given subnet.

I guess I can reach the goal using the quota2 match, which give me the ability to increase and decrease a counter: essentially I'll increase the counter with a SYN packet and decrease the counter with a FIN packet. But this solution is incomplete: it can not count the connections not closed with a FIN packet (time outed connections) and It can't manage the UDP connections (already properly managed by the conntrack module).

+1 vote

I have some doubts about pool of connections with my application developed in PHP. I want optimize the use of resources and database connections has a high computational cost. So the idea is keep a pool of open connections with database.
I'm using Apache webserver, language PHP and PostgreSQL database. In this case the pool of conections must be configured on Apache, PHP or PostgreSQL?

+1 vote

I am currently upgrading from mysql 5.1.72 -> mysql 5.6 and the migration and upgrade is sound (In a QA ENV). Queries work etc. However, when I run a query similar to "SELECT table.* FROM table WHERE (some_id IN (13528, 14906, 38845)) ORDER BY date DESC LIMIT 1;" on 5.1.72 and on 5.6.15 I get back different data. The date for all of the data are exactly the same to the second.

However, if I run "SELECT table.* FROM table WHERE (some_id IN (13528, 14906, 38845)) ORDER BY date LIMIT 1;" it comes back with the exact same data that is expected. Is this a bug? Or am I missing here?