Sharing plugin tables between 2 sites in the same database

I’ve created an alternative wp-config.php and renamed to wp-config2.php with the same configuration except for the table prefix.
Then I tried by editing all the plugin files. At the top of each file I found:

if ( ! defined( ‘ABSPATH’ ) ) {

exit; // Exit if accessed directly!

}

And I replaced it for:

require_once(ABSPATH . ‘wp-config2.php’);

$connection = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD);

mysqli_select_db($connection, DB_NAME);

But doesn’t work. The plugin keeps connecting to the original tables instead of the tables I want it to connect to… I don’t know what I’ve missing :S