@@ -10,7 +10,7 @@ Start by creating a replication stream to capture database changes in real-time.
1010use DataAccessKit\Replication\Stream;
1111
1212// Connect to MySQL replication stream
13- $stream = new Stream('mysql://replication_user :password@localhost:3306?server_id=100 ');
13+ $stream = new Stream('mysql://user :password@localhost:3306');
1414
1515// Process events as they occur
1616foreach ($stream as $event) {
@@ -84,7 +84,7 @@ Initialize a stream to connect to the MySQL replication log:
8484use DataAccessKit\Replication\Stream;
8585
8686// Create stream with connection URL
87- $stream = new Stream('mysql://replication_user :password@localhost:3306?server_id=100 ');
87+ $stream = new Stream('mysql://user :password@localhost:3306');
8888
8989// Start iterating over events
9090foreach ($stream as $event) {
@@ -96,14 +96,14 @@ foreach ($stream as $event) {
9696Connection URL formats:
9797
9898``` php
99- // MySQL (port 32016 when using docker-compose )
100- $url = 'mysql://root @localhost:32016?server_id=100 ';
99+ // MySQL/MariaDB (user only )
100+ $url = 'mysql://user @localhost:3306 ';
101101
102- // MariaDB (port 35098 when using docker-compose )
103- $url = 'mysql://root @localhost:35098?server_id=100 ';
102+ // MySQL/ MariaDB (user and password )
103+ $url = 'mysql://user:password @localhost:3306 ';
104104
105- // With authentication
106- $url = 'mysql://user:password@localhost:3306?server_id=100 ';
105+ // MySQL/MariaDB (explicitly specify server ID)
106+ $url = 'mysql://user:password@localhost:3306?server_id=123 ';
107107```
108108
109109### Events
@@ -211,7 +211,7 @@ foreach ($stream as $event) {
211211}
212212```
213213
214- For production systems, use database-based checkpointing:
214+ For production systems, you'll probably want to use something like database-based checkpointing:
215215
216216``` php
217217class DatabaseCheckpointer implements StreamCheckpointerInterface {
0 commit comments