PHPackages                             dizews/yii2-db-console - 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. dizews/yii2-db-console

ActiveYii2-extension[Database &amp; ORM](/categories/database)

dizews/yii2-db-console
======================

The yii2 extension help to work in console with databases

1.0(10y ago)27.4k2BSD-3-ClausePHP

Since Mar 17Pushed 9y agoCompare

[ Source](https://github.com/dizews/yii2-db-console)[ Packagist](https://packagist.org/packages/dizews/yii2-db-console)[ RSS](/packages/dizews-yii2-db-console/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

db-console on Yii2
==================

[](#db-console-on-yii2)

Help you to work with different console database clients in unified format. Currently it support `mysql`, `postgres`, `sqlite` and `mongodb` drivers.

[![Total Downloads](https://camo.githubusercontent.com/8c9a9c5e9aa6afe65902bee0212f6654379573afeb8670470021051bcd1d0d07/68747470733a2f2f706f7365722e707567782e6f72672f64697a6577732f796969322d64622d636f6e736f6c652f646f776e6c6f616473)](https://packagist.org/packages/dizews/yii2-db-console)[![Code Climate](https://camo.githubusercontent.com/d900ec44f8c1974293a88ee96d748cbf408e35f9e758c86d783ddc5e58def5f7/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f64697a6577732f796969322d64622d636f6e736f6c652f6261646765732f6770612e737667)](https://codeclimate.com/github/dizews/yii2-db-console)

Features
--------

[](#features)

- Open console database client.
- Load data from file.
- Dump data into the destination.
- Restore data from the dump.

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --dev --prefer-dist dizews/yii2-db-console "*"

```

or add

```
"dizews/yii2-db-console": "*"

```

to the require section of your composer.json.

General Usage
-------------

[](#general-usage)

```
    'controllerMap' => [
        'db-console' => [
            'class' => 'dizews\dbConsole\DbController'
            //'drivers' => [
            //    'mysql' => [
            //        'class' => 'dizews\dbConsole\drivers\Mysql',
            //        'clientPath' => '/usr/local/bin/mysql'
            //    ]
            //]
        ]
    ]
```

Run database client (mysql)

Usually if you want to connect to a mysql server in terminal you need to write:

```
mysql --host=127.0.0.1 --port=3306 --user=user database --password=pwd
```

with this extension you just need:

```
php yii db-console

```

Run mongodb client

```
php yii db-console --name=mongodb

```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 94.1% 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

Unknown

Total

1

Last Release

3708d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2749a5afb8e69371bc54becff330329364cbf061cbbefacd07b0b7129bcd83e4?d=identicon)[dizews](/maintainers/dizews)

---

Top Contributors

[![dizews](https://avatars.githubusercontent.com/u/452641?v=4)](https://github.com/dizews "dizews (16 commits)")[![bariew](https://avatars.githubusercontent.com/u/827508?v=4)](https://github.com/bariew "bariew (1 commits)")

---

Tags

consoledatabasemysqlsqlitepostgresdbmongodbyii2

### Embed Badge

![Health badge](/badges/dizews-yii2-db-console/health.svg)

```
[![Health](https://phpackages.com/badges/dizews-yii2-db-console/health.svg)](https://phpackages.com/packages/dizews-yii2-db-console)
```

###  Alternatives

[aura/sqlquery

Object-oriented query builders for MySQL, Postgres, SQLite, and SQLServer; can be used with any database connection library.

4572.9M34](/packages/aura-sqlquery)[scienta/doctrine-json-functions

A set of extensions to Doctrine that add support for json query functions.

58523.9M36](/packages/scienta-doctrine-json-functions)[atlas/query

Object-oriented query builders and performers for MySQL, Postgres, SQLite, and SQLServer.

41249.0k7](/packages/atlas-query)[aura/sqlschema

Provides facilities to read table names and table columns from a database using PDO.

41234.1k4](/packages/aura-sqlschema)[apix/cache

A thin PSR-6 cache wrapper with a generic interface to various caching backends emphasising cache taggging and indexing to Redis, Memcached, PDO/SQL, APC and other adapters.

114542.8k6](/packages/apix-cache)[nettrine/dbal

Doctrine DBAL for Nette Framework

322.6M19](/packages/nettrine-dbal)

PHPackages © 2026

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