# networking apache24 server with mysql server



## bonbon (Jul 6, 2018)

Hi all......

I have 2 servers both have freebsd 11. First one has apache24 and it is up and running with a static ip of 10.0.0.4 and 2 network cards installed.
The second one has mysql57-server installed and mysql is up and running , this has only one network card installed.

My question is how to hook the 2 machines together.  Do I need mysql57-client installed on the web server? 

If I plug them together how do I set up the network cards? what settings do i use with ifconfig to make them communicate?

I am using webmin and have it installed on the webserver and it is working fine. just need to get the db server to show up so I can use the mysql
module in webmin to work with my db server.

Thanks in advance for helping me with this.........I have been googling like crazy and can not come up with an answer......


----------



## mark_j (Jul 8, 2018)

You have different questions. 'Hook' them together? Do you mean connect them with a cross-over cable?
Do you have some sort of routing? Switching? 
Whatever the mysql server's ip address is you connect to that. 
Whether you put the web server on the same machine as mysql is your choice and is guided by capacity (ram, disk space, cpu power) and personal preference; they don't have to reside on the same machine.

Have you set up mysql and/or apache before? If you want to use the 'mysql' command then yes, install the client on either or both servers.
As far as i know about webmin is it only deals with local services, in which case it knows nothing about another server running mysql. Your choice is install webmin on both servers or consolidate mysql/apache/webmin to the one server.

Suffice to say we need some more detail on your lan, your ip numbers of the machine hosting mysql, also your gateway/router if that's relevant.

Of course i might be totally misunderstanding everything...


----------



## Jumplow (Jul 8, 2018)

> I have 2 servers both have freebsd 11. First one has apache24 and it is up and running with a static ip of 10.0.0.4 and 2 network cards installed.



Yeah I'm a little confused bud. agreed. Please provide more details especially about the routing. A lot of legacy based software companies use this language anyways.

Thx!


----------



## ShelLuser (Jul 8, 2018)

Other than what the others have said...



bonbon said:


> I have 2 servers both have freebsd 11. First one has apache24 and it is up and running with a static ip of 10.0.0.4 and 2 network cards installed.
> The second one has mysql57-server installed and mysql is up and running , this has only one network card installed.
> 
> My question is how to hook the 2 machines together.  Do I need mysql57-client installed on the web server?


What do you expect the webserver to do with the MySQL database? Because that is important to know and it will determine what kind of software you need to install. For example, if your goal is to access the database using PHP you're probably looking for something like databases/php56-mysql. If you want MySQL support for Perl you'd be looking at databases/p5-DBD-mysql, and so on.

Some may pull in the client version, but you can easily leave that up to package dependencies.


----------

