Installing order in installing apache, php, and mySQL

Some years ago, I installed apache, php, mySQL by one click.at a time
It is still good.

Since I need a new server, Now I like to install apache, php and mySQL each.

(Q1) which order should I take in installing them?
Apache first, PHP first, or mySQL first?

(Q2) I think I need Apache as the web server, and PHP as the sever side language
But I can change the database,
Which database is good at this moment in your think for a new server in long-term view?
I am accustomed with mySQL, but I think I can use another one because SQL is almost same and it will be a new experience and good for my database knowledge.
Which database will you recommend?

The OS of the new server is Xubuntu now.

The best order to install apache, PHP and mysql on any system is to install Apache first and MySQL on second than install PHP and PHP extensions.

Ideally it should not matter. Ideally each one will find installations of the others and adjust as appropriate. It would be good to study the installations instructions for each one first before doing anything. That should work better than asking in a forum. But if the instructions are confusing then that is what forums are most useful for.

The only reason that order might make a difference that I can think of is so that certain ini / config values could be used. But “revisiting” those files or even restarting services shouldn’t be all that difficult on your own machine. For that matter, you would likely make some ini / config changes anyway from time to time.

From the lengthy list of search results about installing LAMP on Xubuntu I would be tempted to follow the DigitalOcean tutorial The reason behind my choice is because they are all paid submissions and thoroughly checked because DigitalOcean’s reputation is at stake plus they allow comments:


Edit:
I find it annoying that there are so many tempting web references that result in a failed installation. Hindsight is wonderful and I sincerely wish comments were allowed on every installation reference.