PHPackages                             szjcomo/mysqli-pool - 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. [Database &amp; ORM](/categories/database)
4. /
5. szjcomo/mysqli-pool

ActiveLibrary[Database &amp; ORM](/categories/database)

szjcomo/mysqli-pool
===================

基于easyswoole的mysql线程池的实现

v0.0.7(6y ago)1801MITPHPPHP &gt;=7.1.0

Since Oct 23Pushed 6y ago1 watchersCompare

[ Source](https://github.com/szjcomo/mysqli-pool)[ Packagist](https://packagist.org/packages/szjcomo/mysqli-pool)[ RSS](/packages/szjcomo-mysqli-pool/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (7)Used By (1)

mysqli-pool
===========

[](#mysqli-pool)

基于easyswoole官方的pool实现的mysql连接池

安装
--

[](#安装)

```

composer require szjcomo/mysqli-pool

```

- 具体用户可参考thinkphp官方手册,在swoole中使用thinkphp db数据库操作

示例
--

[](#示例)

```
require './vendor/autoload.php';

/**
easyswoole 3.3.0之前可以使用的版本

use EasySwoole\Mysqli\Config;
use EasySwoole\MysqliPool;

$config = new \szjcomo\mysqli\Config([
    'host' => '127.0.0.1',
    'port' => 3306,
    'user' => 'xxx',
    'password' => 'xxx',
    'database' => 'xxx',
    'prefix'=>'xxx',
    'debug'	=>true
]);

\szjcomo\mysqliPool\Mysql::getInstance()->register('default',$config);

go(function(){
	$db = \szjcomo\mysqliPool\Mysql::defer('default');
	$list = $db->name('admin_user')->select();
	print_r($list);
});**/

/**
 * easyswoole 3.3.0后必须使用的版本
 */

use szjcomo\mysqliPool\MysqlPool;

$config = new \EasySwoole\Pool\Config();

$arr = [
    'host'                 => '192.168.1.107',
    'port'                 => 3306,
    'user'                 => 'xxx',
    'password'             => 'xxx',
    'database'             => 'xxx',
    'prefix'               => 'xxx',
    'timeout'              => 30,
    'debug'                => true,
    'charset'              => 'utf8'
];

$pool = new MysqlPool($config,$arr);

go(function() use ($pool) {
    $model = $pool->defer();
    $result = $model->name('admin_user')->where('id','in',[1,3,4])->select();
    print_r($result);
    print_r($pool->status());
});

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~6 days

Total

6

Last Release

2360d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1ef6302d78be1eee555959fb1e9eb43578ad83603c266b0be073ada7fe015528?d=identicon)[szjcomo](/maintainers/szjcomo)

---

Top Contributors

[![szjcomo](https://avatars.githubusercontent.com/u/54160515?v=4)](https://github.com/szjcomo "szjcomo (9 commits)")

### Embed Badge

![Health badge](/badges/szjcomo-mysqli-pool/health.svg)

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

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.3k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M543](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M209](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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