PHP code example of gemini / php-mysql-replication

1. Go to this page and download the library: Download gemini/php-mysql-replication library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

gemini / php-mysql-replication example snippets


GRANT REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'user'@'host';

GRANT SELECT ON `dbName`.* TO 'user'@'host';
sh
php example/dump_events.php
sh
php example/benchmark.php