You can use the WPDB class to instantiate an external DB.
Looks like roughly this:
define('EXT_DB_USER', 'username');
define('EXT_DB_PASSWORD', 'password');
define('EXT_DB_NAME', 'ext_data' );
define('EXT_DB_HOST', '123.123.123.123:3307');
$wpdb_ext = new wpdb(EXT_DB_USER, EXT_DB_PASSWORD, EXT_DB_NAME, EXT_DB_HOST);
then you just call $wpdb_ext with normal WP functions just like you would #wpdb.
For log in info it’s usually easiest to sync login information.
If you really want to build your own oAuth type solution take a look at KeyRing
Related Posts:
- Forcing nickname as display_name in custom edit profile template
- Importing users from one database to another and saving passwords
- Connect to live db whilst working locally
- Allow logged in users to store and display some data
- Remote database connection and local development
- Remote database -> massive response time increase?
- Need help with creating a searchable user data by name or specific number like ID
- Local Content different from Remote Content
- Where To Find bb_profile_data(); In bbPress?
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- phpMyAdmin – Error > Incorrect format parameter?
- Why is my database import losing text widget data?
- Get error messages when $wpdb->insert() returns false?
- Does dbDelta delete columns as well?
- Are There Any Plans for WordPress to Support Databases Other Than MySQL?
- Insert data in database using form
- how can get database name in wordpress?
- Special characters in WordPress UTF-8 [closed]
- Long option names fail silently?
- Upload files – total size limit – WordPress/Contact Form 7
- Relationship between performance and database size
- WordPress and automated MySQL backups to a different host
- Scheduling posts in database
- Size article thumbnails and retrieve them directly from database
- Should I be able to run two different “close” code versions of wordpress with the same DB
- Need of separate security plugins for both root and subfolder sites WordPress?
- Escaping / encoding data before insert into a database?
- how to store arrays into a database
- Error: SELECT SQL_CALC_FOUND_ROWS
- Where are WP_Errors Saved
- Get all images from this database table
- Delete transients in website
- Error establishing database connection – high traffic?
- Export / import WordPress database
- Sync user meta data to a second database
- WordPress Database Huge wp_usermeta Table
- wp-cli search is returning ‘search’ is not a registered subcommand of ‘db’
- Switching Databases in LocalHost
- How to get membershiplevel from WordPress Database?
- cache specific data?
- wp_insert_post causing There was an error connecting to the database: Access denied for user ‘root’@’localhost’ (using password: NO)
- How to update the values when the featured image has changed?
- Does WordPress $wpdb functions wait when table is locked?
- Copying database tables to new database
- Duplicating Complete WordPress Install for Development and then Redeployment?
- Importing 10 Years of Media into the WP Database
- I have a 1300 line excel spreadsheet that needs to get into a wordpress site ASAP – Looking for ideas
- 2 WordPress sites with 2 databases but sharing the same users
- How to combine multiple wp_insert_post into one in order to gain better performance
- Insert Query not working in the form
- Two prefixes in database? Which one is valid?
- Enter user registration information in the database
- connecting to DB from custom php file
- Problem in using wpdb
- pull data from a remote wordpress database
- Create database on installation
- Importer fails to import every post
- Users table missing from Database [closed]
- Clear Terms from Taxonomy for Specific Post IDs?
- Options on how to Display member specific data from a MS SQL database
- How to connect and insert data in database of wordpress?
- Unkown meta_value in ACF
- Buddypress avatar image in database [closed]
- WordPress security [closed]
- How to split the WordPress database?
- wp_insert_user not creating account correctly when ID is manually set
- Installing local to live WP into subdirectory
- WordPress SQL – How to Check for Category?
- Getting WordPress to work inside a rails 3 application
- Advantages of dbDelta
- Only allow user to access a link once a year, based on their joining date
- MSQL database wp_postmeta has meta key tve_revision
- Occasional Error Establishing a Database Connection
- Display user data in numbered list
- Removing old_slug and old_date from WordPress Database
- Help with $wpdb on custom code
- “BS_” rows in postmeta table
- How do I change several broken URLs in a several wordpress databases in the fastest way?
- Optimize WP site for millions of posts
- I Want a More Concice Form of Data than an Array
- Duplicate database to roll back theme & content changes
- WordPress Migration – Issue with admin panel changes
- mySQL database size large, but tables size less
- Error establishing database connection error during first WordPress run
- How To connect to the same WordPress database with different database user
- How much post meta data is too much?
- I have include wp-config, should I add global $wpdb also?
- Localize strings from db
- Can’t Install WordPress (local) Failed to open file wp-includes/wp-db.php
- version control for wordpress? (wordpress folder and database at same time)
- Redirect Issue: WordPress database
- Category not displaying in add post, edit post, and categories page.
- Install WordPress with SQL database
- Creating Job Tickets
- Best db table structure for users with many records
- How to stop WordPress from using utf8mb4_unicode_ci collation
- wp-config was suddenly updated
- Weird WP -Cli Error Connection Refused
- Order of search results based off of a backend custom field and also in alpha order
- How to find fresh (last modified) and sql backup?