top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to seperate web servers and Database servers?

+1 vote
368 views

In the application running in one particular web server and fetching data in the other database servers.
In the sense both machines running seperately..

posted Jun 13, 2014 by Mithun Kumar Muddan

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

2 Answers

+1 vote
 
Best answer

Its perfectly possible,

Suppose you have a MYSQL server and another server running Apache httpd. Then you need to configure the mysql to allow the IP of the httpd machine to have access. And from apache it it just providing the IP of the machine of the MySql server.

Steps on machine where MySql Server is running

$ FLUSH PRIVILEGES;
$ GRANT ALL PRIVILEGES ON *.* TO  'username'@'X.X.X.X'  IDENTIFIED  BY  'mypassword';
Where X.X.X.X is the IP of the machine where apache is running.

Now on Apache or PHP in place of 127.0.0.1 you will provide the IP of the MySql Server machine and login and password as you have provided in the above steps.

answer Jun 13, 2014 by Salil Agrawal
0 votes

Just addition to what Salil suggested,
You just need to grant PRIVILEGES to the username@ipaddress identified by the and you are done.

answer Jun 16, 2014 by Tapesh Kulkarni
Similar Questions
+1 vote

Is it possible multiple docker containers each one running web server and listening on the same port, mapped to the same host machine port ? One possible solution to multiple IPs at the host machine and the port exposed by each container is mapped to different ip and standard port 80. This solution would not be feasible in case number of containers increases in the same host and a new IP need to be assigned at host machine for each container.

+1 vote

I have two virtual web server and only one IP for the host. So the need of some kind of proxy server.
Whitch one should I use? (apache, nginx, varnish, squid)

I need also the same for smtp (two postfix), if possible the same one :-) basic config?

I have one host , one IP and two domain, one for each virtual machine and the result I want:
abc.org[188.165.211.22]--->abc.org[192.168.50.2]
xyz.org[188.165.211.22]--->xyz.org[192.168.50.3]

+1 vote

We have an application wherein we want to keep separate database for each client. We want to achieve this using multi tenancy approach. A working example will be highly appreciated.

...