MySQL Forums
Forum List  »  Perl

use different socket file to connect with one dataBase
Posted by: M ALATTAR
Date: November 02, 2010 11:19AM

Hi,
I am working with linux containers in order to simulate adhoc networks.
Under my host i create several containers, each one represents a fedora host...but they are in reality using one common root file system.
I installed mysql server in this root file system as a result every container will have mysql server. Firstly,i had a problem that one container only can connect to mysql server at one time. Trying to connect to the mysql database from another one will cut the connection in the preivous container. Any way, i fixed this problem by specifying a different socket file for each container. With my solution any container can connect to my DataBase and execute select query without any problem. I noticed that inserting a row to any table from one container is ok and i can get it, by a select statement, from this container. But i cannot get it from other containers. I need to restart mysql server at these other containers to get the updated data. Another things, deleting or updating rows in the database from a container will cause table crash.
I think that connecting from different containers to one database is considered as connecting several servers to one database and this could cause
problem according to mysql documentation.

Sorry for the long explication, but any idea to solve this problem?
Thanks,
MALATTAR

Options: ReplyQuote


Subject
Written By
Posted
use different socket file to connect with one dataBase
November 02, 2010 11:19AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.