The setup process for SharDB differs from HyperDB in a few key ways:
Database Configuration
SharDB expects the databases to be named according to a specific convention, with a prefix and a suffix based on an MD5 hash. For example, if you have 16 databases, they would be named `prefix_0`, `prefix_1`, ..., `prefix_f`, `prefix_main`. The `prefix_main` database is used for global tables.
HyperDB has more flexibility in naming conventions and supports master-slave replication out of the box.
Multi-Server Support
SharDB supports databases spread across multiple servers, while HyperDB is typically used with databases on the same server.
Configuration File
SharDB uses a separate `db-settings.php` configuration file that is included in `wp-config.php`. HyperDB configuration is done directly in `wp-config.php`.
Migration
SharDB comes with a migration tool to move blog data into the sharded databases. HyperDB does not include a built-in migration tool.
Ease of Setup
SharDB is considered slightly easier to set up initially compared to HyperDB, but HyperDB may have more features and flexibility once configured.
In summary, the key differences are the naming convention, multi-server support, configuration file location, migration tool, and overall ease of initial setup. Both plugins aim to provide a way to scale WordPress Multisite by distributing the database load across multiple databases.
Citations:[1] https://wordpress.stackexchange.com/questions/2825/wordpress-sharding-which-multi-db-plugin-to-use
[2] https://vbridge.co.uk/2014/01/22/shardb-hyperdb-and-multi-db-part-1/
[3] https://wpmututorials.com/plugins/shardb/
[4] https://github.com/rrennick/shardb
[5] https://github.com/wp-plugins/shardb