Old post but in case anyone else is looking for the answer for how to load just the database functions (wpdb) of WordPress take a look at the bottom of my post here:
https://www.beautifulcoding.com/snippets/176/using-wordpress-funcitons-outside-of-wordpress/