I am pretty new to linux and LAMP setup. I want to setup a LAMP environment with AP on one linux server and M on a different linux server. I have a hard time finding a relevant document with such a configuration.
I have done the following steps so far:
yum install -y httpd /sbin/service httpd restart yum install -y php php-mysql sed -i "s/Listen 80/#Listen 80/g" /etc/httpd/conf/httpd.conf yum install -y mod_ssl openssl /sbin/service httpd restart service iptables stop
I changed the ServerName in /etc/httpd/conf/httpd.conf from
ServerName 22.214.171.124 (ip address of server1) /sbin/service httpd restart
yum install -y mysql-libs yum install -y mysql yum install -y perl-DBI yum install -y perl-DBD-MySQL yum install -y mysql-server /sbin/chkconfig mysqld on /sbin/service mysqld start mysql -u root -e "CREATE USER 'mysqluser' IDENTIFIED by 'password'" mysql -u root -e "CREATE USER 'mysqluser'@'localhost' IDENTIFIED by 'password'" mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'mysqluser'@'localhost' WITH GRANT OPTION" mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'mysqluser'@'%' WITH GRANT OPTION" mysql -u mysqluser -p password -e "CREATE DATABASE mysqldb" mysql -u mysqluser -p password mysqldb < /tmp/mysqlinstaller/world.sql service iptables stop
Then I had these post configuration steps:
On server 2, where my mysql is installed, I did the following:
bind-address = 126.96.36.199 (ip of server 1 where apache/php are installed) service mysql restart
But I am not able to establish a connection. Can you point out what I am missing and guide me please.
You tried to bind MySQL to the wrong address.
bind-address = 188.8.131.52
This address specifies what IP address on that server which MySQL listens to and receives connections.
It should either remain unset, to listen on all interfaces, or set to the IP address of the server it’s running on.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.