What you suggest is pretty much what everyone did before memcached: load your database server with ram and use various tricks to pin the important stuff in memory.
However the memcached code path is pretty lean and will give you better performance than in-memory mysql for single key/value lookups.