Postgresql 10 has been out for a while now. One of the features that was added that I'm pretty keen on is better support for parallel queries which is worth migrating away from MySQL for.
Copy, paste and execute the commands below:
echo 'deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main' | sudo tee /etc/apt/sources.list.d/pgdg.list wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - sudo apt-get update sudo apt-get install postgresql-10 -y
If you want to check what version of PostgreSQL you are now running, use the following command:
sudo -u postgres psql postgres -c 'SELECT version()' | grep PostgreSQL