Download the PHP package userqq/mysql-binlog without Composer

On this page you can find all versions of the php package userqq/mysql-binlog. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package mysql-binlog

Pure php MySQL/MariaDB replica client.

This package enables you to react to changes in your database without creating additional load on it, such as triggers, and performs faster than similar solutions. It impersonates a replica and uses binlog from MySQL/MariaDB to track changes in the database. When data changes, a database writes an event to binlog, which could be converted to JSON. This JSON can be sent to any destination, such as Apache Kafka, Kinesis, RabbitMQ or directly to other databases such as MongoDB, ClickHouse, Elastic to ensure fast and efficient data processing. With this package, you can have a copy of your database with a delay of minutes or even seconds, no matter how large your database is.

It can be useful for companies that want to keep a copy of their data in other systems to ensure more reliable storage or to process data with other tools. also it be used to send data to message queues, making it easier to process and analyze data in real-time. Therefore, companies can take advantage of the benefits of message queueing systems, such as load balancing, scalability, and fault-tolerance, while still maintaining a reliable copy of their data in other systems.

Installation

This package can be installed as a Composer dependency.

Сonfiguration

Database configuration

In order to parse data from the binlog without additional actions and without excessive requests to the information_schema, the database must be properly configured. This allows for the re-reading of the data types and column names without additional requests, and thus the data stored in the binlog can be re-read even without the database, while still providing all the details about the data.

This library requires the binlog_row_metadata option, which is available in MySQL >= 8.0.1 or in MariaDB >= 10.5.0. The binlog_row_metadata option must be set to FULL to ensure that all necessary metadata is included in the binlog for proper parsing.

Just add the following config from example below to your database configuration, then restart the database and prune old binary logs:

This will flush the current binary log to disk and then remove all binary logs before the current time.

Usually you can find config in /etc/mysql directory.

Binlog reader configuration

To simplify configuration library exposes UserQQ\MySQL\Binlog\Config class:

Here is a list of available configuration options:

Please refer to Config.php for more details

Run the application

Then just create an instance of UserQQ\MySQL\Binlog\EventsIterator and iterate over it.

Run inserts, updates, and deletes on your database and see how it reacts!

See the examples folder for more examples.


All versions of mysql-binlog with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-gmp Version *
ext-pcntl Version *
amphp/amp Version ^3
amphp/file Version ^3
amphp/log Version v2.0.0-beta.2
amphp/socket Version ^2
monolog/monolog Version ^3
revolt/event-loop Version ^1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package userqq/mysql-binlog contains the following files

Loading the files please wait ....