In one of my page I have to fetch data from remote mysql database. We have connection to remote mysql database by creating new instance of $wpdb class.
$mydb = new wpdb(DB_USER2, DB_PASSWORD2, DB_NAME2, DB_HOST2);
$post_author=$mydb->get_row("Select display_name from wp_users where ID=1");
The above query is working fine. But when we are using get_the_author_meta or the_author_meta it will not return /print anything. This is same for every wordpress built in function.
Can anyone tell why built in wordpress function is not working when we connecting to remote database?