Yes, you can use one server for your web server and another for your database. When you are configuring WordPress you would supply the hostname (or IP address) for the database server instead of localhost
. This is a common set up that allows you to scale the two servers independently.
Your MySQL server will have to be configured to allow network connections. You'll also want to configure a firewall to only allow connections from your web server(s).
Amazon will host MySQL for you in the cloud, so will EngineYard. Google for "Hosted MySQL" for more results.