PHPackages                             josecelano/phpsql - 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. josecelano/phpsql

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

josecelano/phpsql
=================

Console PHP SQL client

16[1 issues](https://github.com/josecelano/phpsql/issues)PHP

Since Dec 22Pushed 8y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

PHP multi database console client
=================================

[](#php-multi-database-console-client)

I needed a SQL Server console client on a Linux system and I found this one:

and I decided to do the same for PHP.

Install
-------

[](#install)

```
git clone git@github.com:josecelano/phpsql.git
cd phpsql

```

You can use it in 3 different ways:

SQL as argument
---------------

[](#sql-as-argument)

```
bin/phpsql --user=root --password= --database=homestead --host=127.0.0.1 --port=3306 "show tables"

```

Standard input (pipe)
---------------------

[](#standard-input-pipe)

```
echo "show tables" | bin/phpsql  --user=root --password= --database=homestead --host=127.0.0.1 --port=3306

```

Interactive shell
-----------------

[](#interactive-shell)

```
bin/phpsql --interactive --user=root --password= --database=homestead --host=127.0.0.1 --port=3306

```

Test
----

[](#test)

```
composer test

```

TODO
----

[](#todo)

- I had to add the `--interactive` option. Ideally interactive mode should be automatically executed if there are no data from the standard input.

Output
------

[](#output)

Output should be something like:

```
C:\Projects\phpsql (master)
λ bin\phpsql.bat --interactive --user=root --password= --database=homestead --host=127.0.0.1 --port=3306
Welcome to interactive php SQL shell. Type 'quit' or 'exit' to exit.
>show tables
+-------------------------+
| Tables_in_homestead     |
+-------------------------+
| appliances              |
| history                 |
| history_types           |
| migrations              |
| password_resets         |
| permission_role         |
| permissions             |
| role_user               |
| roles                   |
| sessions                |
| social_logins           |
| users                   |
| wishlist_item_feedbacks |
| wishlists               |
+-------------------------+
>

```

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/58816?v=4)[Jose Celano](/maintainers/josecelano)[@josecelano](https://github.com/josecelano)

---

Top Contributors

[![josecelano](https://avatars.githubusercontent.com/u/58816?v=4)](https://github.com/josecelano "josecelano (1 commits)")

---

Tags

consoledatabasemssqlmyssqlphpsql

### Embed Badge

![Health badge](/badges/josecelano-phpsql/health.svg)

```
[![Health](https://phpackages.com/badges/josecelano-phpsql/health.svg)](https://phpackages.com/packages/josecelano-phpsql)
```

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k116.5M113](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[pgvector/pgvector

pgvector support for PHP

198628.3k10](/packages/pgvector-pgvector)

PHPackages © 2026

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