MYSQL:
to connect locally from a linux user to mysql using the root mysql user.
From root linux account, mysql -u root -h localhost -p,
mysql> use mysql;
UPDATE user set plugin='mysql_native_password' where user='root';
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'newpassword';
FLUSH PRIVILEGES;
quit
Apache2:
sometime the apache just broke with a mutex error.
add to apache2.conf
Mutex posixsem
Mysql:
sometimes broke because have not enough memory, in that case add a swapfile, aws doesn't offer swap by default
sudo dd if=/dev/zer of=/var/swapfile bs=1M count 4096 , this add 4GB of swap file.
sudo mkswap /var/swapfile
sudo swapon /var/swapfile
and add to fstab:
/var/swapfile swap swap defaults 0 0