使用远程MySQL设置LAMP

I am new to linux and I want to set up my network with one centralized MySQL server. I want my Web server to have Apache, PHP, and Wordpress installed with all MySQL references pointing to the database server.

I am having a hard time finding documentation on how to configure this. How do I set up a LAMP configuration across two servers with MySql as a stand alone dbms?

How do I congigure Apache, PHP and Wordpress in this setup?

If you wanna have your mysql on a remote server and let your local applications to connect to it , follow this steps :

  • run your mysql on your server (with a specific ip/computer name)
  • find my.conf in your mysql directory
  • edit my.conf and find the line : bind-address = 127.0.0.1
  • comment the line bind-address = 127.0.0.1 by adding # before it
  • restart your lamp by running this command /opt/lampp/lampp restart
  • in your local application set the mysql host from localhost to server ip or server name

DO NOT Forget before apply any changes create a backup from you my.conf, And grant all access to a user in your mysql on your server.