Use the HyperDB plugin.
http://wordpress.org/plugins/hyperdb/
From the FAQ of the plugin
How does HyperDB support replication?
HyperDB does not provide replication services. That is done by configuring MySQL servers for replication. HyperDB can then be configured to use these servers appropriately, e.g. by connecting to master servers to perform write queries.