I just got my new server setup and in the corner and am in the process of moving services over to it from my existing box. I need to move over mysql and apache.
What's the best way to move everything over? Just copy over all the apache directory roots and the sites (the config files) I'm assuming is the best/only way to get apache over, but with mysql I obviously want to keep all the passwords for things, so should I just backup and restore or can I make them talk to each and tell the one server to just suck data from the other one?
EDIT: I can afford to take the site down for 30 minutes or so, if that makes a difference.
Learning to use mysqldump won't hurt and it will help you make backups of your databases and transfer them to another server too. Passwords and some other useful things live in database named mysql. A simple example:
Then just feed it to mysql anywhere else.
Building on what Gleb said, and what Google found for me:
As Gleb said, using mysqldump is the easiest way (depending on the traffic on the database. Very heavy and mysqldump won't pick up some changes).
With apache, just rsync the directories across before-hand, then do it again when you're ready to do the switch. That way you minimize the size of the sync when it's crunch time.
You'll also want to do it before hand to make sure that your various configuration files were picked up and synced correctly (and that you got them all).
This isn't too complex, but it is good practice for bigger live migrations.
Building on Gleb & darkhelmet's snippet, I'd strongly recommend running mysqldump with --opt (depending on your version of MySQL, it might not be the default) to minimize the transfer amount, as well as a bunch of optimizations to the dump/import process.
Furthermore, as you say you want to keep the privileges / user tables, you may want to run with --all-databases.
Another option you have would be using MySQL's replication to (as you put it) suck data over. I'm guessing you don't have binary logging enabled (if you did, the process would be painless).
One of the most important points if using mysqldump is to make sure you run everything with the correct character set (using latin1 if you have utf8 data may cause some "interesting" issues).