PHPackages                             dzegarra/tracy-mysqli - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. dzegarra/tracy-mysqli

ActivePackage[Logging &amp; Monitoring](/categories/logging)

dzegarra/tracy-mysqli
=====================

This lib extends mysqli to allow you to see all your executed queries. It also includes a Bar Panel for Tracy

1.1.1(9y ago)27.9k↓71.4%1[1 issues](https://github.com/dzegarra/tracy-mysqli/issues)MITPHP

Since Aug 31Pushed 7y ago1 watchersCompare

[ Source](https://github.com/dzegarra/tracy-mysqli)[ Packagist](https://packagist.org/packages/dzegarra/tracy-mysqli)[ RSS](/packages/dzegarra-tracy-mysqli/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (5)Used By (0)

MySQLi panel for Tracy
======================

[](#mysqli-panel-for-tracy)

This lib allow you to see all your executed SQL queries when you are using the MySQLi php driver. It also includes a Bar Panel for Tracy, see the result below.

Result
------

[](#result)

[![MySQLi logger with Tracy](https://cloud.githubusercontent.com/assets/651286/23301744/b50e5f82-fa8b-11e6-8cb3-8cd249b1fe07.png "MySQLi logger with Tracy")](https://cloud.githubusercontent.com/assets/651286/23301744/b50e5f82-fa8b-11e6-8cb3-8cd249b1fe07.png)

Installation
------------

[](#installation)

Install it via composer:

`composer require dzegarra/tracy-mysqli`

How to use
----------

[](#how-to-use)

```
// Create an instance for Tracy Bar Panel
$panel = new \Dzegarra\TracyMysqli\BarPanel();

// Add the panel to Tracy
\Tracy\Debugger::getBar()->addPanel($panel);

// Make a connection to the DB using the \Dzegarra\TracyMysqli\Mysqli class instead of mysqli
$conn = new \Dzegarra\TracyMysqli\Mysqli("hostname", "username", "password", "database");

// Execute your queries
```

How it works
------------

[](#how-it-works)

First you need to add the panel to the Tracy bar. The panel won't be render until the shutdown process kick in (either way the script ends or you call `die` or `exit`).

Just before the panel start to render the list of all the SQL querys will be fetched from the Mysqli class.

All the queries are store in a static variable in the Mysqli so, no matters how many instances of the Mysqli class you create, all the queries of all the instances will be store.

Inspiration and credits
-----------------------

[](#inspiration-and-credits)

This repo is based in [filisko/pdo-plus](https://github.com/filisko/pdo-plus).

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 88.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~88 days

Total

3

Last Release

3418d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d4b73935d763e0a8701d4c80fefb3283428f61c78e5b71f4cd7324c6f0b9a7ae?d=identicon)[dzegarra](/maintainers/dzegarra)

---

Top Contributors

[![filisko](https://avatars.githubusercontent.com/u/8798694?v=4)](https://github.com/filisko "filisko (16 commits)")[![dzegarra](https://avatars.githubusercontent.com/u/651286?v=4)](https://github.com/dzegarra "dzegarra (1 commits)")[![speto](https://avatars.githubusercontent.com/u/421634?v=4)](https://github.com/speto "speto (1 commits)")

---

Tags

loggingmysqlitracyqueries

### Embed Badge

![Health badge](/badges/dzegarra-tracy-mysqli/health.svg)

```
[![Health](https://phpackages.com/badges/dzegarra-tracy-mysqli/health.svg)](https://phpackages.com/packages/dzegarra-tracy-mysqli)
```

###  Alternatives

[monolog/monolog

Sends your logs to files, sockets, inboxes, databases and various web services

21.4k1.0B8.2k](/packages/monolog-monolog)[symfony/monolog-bundle

Symfony MonologBundle

2.9k262.9M1.8k](/packages/symfony-monolog-bundle)[itsgoingd/clockwork

php dev tools in your browser

5.9k29.7M119](/packages/itsgoingd-clockwork)[bugsnag/bugsnag-laravel

Official Bugsnag notifier for Laravel applications.

90336.2M38](/packages/bugsnag-bugsnag-laravel)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32134.1M3](/packages/bugsnag-bugsnag-psr-logger)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19127.3M16](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
