



Log into this server, then update your package cache and install the MySQL server software: sudo apt-get update To get started, we’ll install MySQL on the server we did not install the LEMP stack on. It also provides the basic structure necessary to load balance and expand our infrastructure even more at a later time. Having our data stored on a separate server is a good way to expand gracefully when we hit the performance ceiling of a one-machine configuration. Step 1 - Installing MySQL on the Database Server Optionally (but strongly recommended), you can secure your LEMP web server with SSL certificates.On one of the servers you’ll need the LEMP (Linux, Nginx, MySQL, PHP) stack installed.Two Ubuntu 16.04 servers, with a non-root sudo-enabled user, and UFW firewall enabled.Prerequisitesīefore beginning this tutorial, you will need: We will be using WordPress as an example so that we have something to work with, but the technique is widely applicable to any MySQL-backed application.
#Php mysql optimizer how to#
In this guide, we’ll discuss how to configure a remote MySQL database server that your web application can connect to. If you are hosting your web server and database backend on the same machine, it may be a good idea to separate these two functions so that each can operate on its own hardware and share the load of responding to your visitors’ requests. As your application or website grows, you may come to a point where you’ve outgrown your current server setup.
