To write your own web pages (that are more than just you basic set of static pages held together with simple links) you will need to learn:
Though there are tools to help you generate these you will need to understand these technologies intimately to use them well.
To be able to generate the above you will need to learn:
- PHP (or one of the other scripting languages)
- Smarty (or the appropriate template engine for your language).
- SQL (mysql is a common implementation of the technology)
Though you could learn Java instead of PHP (I personally (but others will disagree) think that PHP is better for web page generation). Java I would use to build more application/service like constructs were strong(static) typing is useful.
To follow up what @SnoopDougieDoug said, if you're going to be going whole-hog and learning server-side scripting, you'll need a server of some sort to run PHP and MySQL on. Apache is probably the most common way to run it. If you don't want to pay for a hosting plan somewhere just to learn on, you can look into either Uniform Server (http://www.uniformserver.com/) or Xampplite on PortableApps if you want a relatively simple (and portable) dev environment.
I think you can start all at the same time, with a good tutorial. For example, a PHP book can cover them all in approriate order. The best way to learn things is to apply them.
With the nosql movement getting ever stronger,new web developers should re-examine their database needs.Most ORM's in popular php web frameworks have a thing for sql.My advice would be to know what you need to achieve your goal and what tools you need.Somewhere down the line,many developers will look for options other than sql.