Community

Site in a Linode, database in other Linode

Avatar baitasite 1 week, 4 days ago

Hey, everybody!
Would you know a way or some tutorial on how to have a website on a Linode and your database in another Linode?

The Tom of the support team said that it was possible yes, but would not have in view some tutorial, suggested that I ask for help here in the community.

Would anyone have something to give me? Any help is welcome!

2 Replies

Hey There!

We don't have a step by step tutorial, but I'd be happy to help as much as I can.

  1. You will want to create the DB Linode and make sure to add a private IP to both your web server and your DB server. Also, ensure that your reboot your Linode after that change and ensure that Network Helper is enabled so it can automatically configure the private IPs.

  2. Install MySQL on the new DB server

  3. Configure MySQL to allow connections from your web server

    Locate and edit your MySQL configuration file:

    sudo vim /etc/mysql/my.cnf
    

    Locate "bind-address" within the configuration file and add your db server private IP:

    bind-address = $databaseip
    

    Force the change by restarting MySQL:

    sudo service mysql restart
    

From there, you can configure your application/web server to communicate through DB servers private IP. You may need to make additional changes, but that should help you get started with a basic setup.

I hope that helps!

@hmorris Wow, thank you very much for your reply, I will try to effect the settings in which you are recommending and see what will give.

I'll come back here with the result as soon as I get it!

Do you think you would gain performance by doing this? Avoid overloading?

Reply

Please enter an answer
Tip:

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct