Coder Social home page Coder Social logo

hlts2 / go-check-database-tables Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 18 KB

go-check-database-tables is command line tool for cheking database table

License: MIT License

Go 100.00%
golang command-line-tool cli-tool database-tools tiny go-check-databse-tables simple

go-check-database-tables's Introduction

go-check-database-tables

go-check-database-tables is command line tool for cheking database table

install

go get github.com/hlts2/go-check-database-tables

CLI Usage

$ go-check-database-tables --help

Usage:
  go-check-database-tables [flags]
  go-check-database-tables [command]

Available Commands:
  help        Help about any command
  ls          List for database tables

Flags:
  -H, --Host string       Host Name (default "localhost")
  -P, --Password string   Password
  -d, --dbms string       Database Management System (default "mysql")
  -h, --help              help for go-check-database-tables
  -n, --name string       Database Name
  -p, --port int          Port (default 3306)
  -t, --table string      Database Table
  -u, --user string       User Name (default "root")
$ go-check-database-tables ls --help

Usage:
  go-check-database-tables ls [flags]

Flags:
  -h, --help   help for ls

Global Flags:
  -H, --Host string       Host Name (default "localhost")
  -P, --Password string   Password
  -d, --dbms string       Database Management System (default "mysql")
  -n, --name string       Database Name
  -p, --port int          Port (default 3306)
  -u, --user string       User Name (default "root")

Usage

You can check the table information by executing this command. This confirms the user table of mysql.

$ go-check-database-tables -H 192.168.33.10 -p 3306 -d mysql -u root -P root -n mysql -t user

+------------------------+-----------------------------------+------+-----+---------+-------+
|         FIELD          |               TYPE                | NULL | KEY | DEFAULT | EXTRA |
+------------------------+-----------------------------------+------+-----+---------+-------+
| Host                   | char(60)                          | NO   | PRI |         |       |
| User                   | char(16)                          | NO   | PRI |         |       |
| Password               | char(41)                          | NO   |     |         |       |
| Insert_priv            | enum('N','Y')                     | NO   |     | N       |       |
+------------------------+-----------------------------------+------+-----+---------+-------+

You can check the table list by executing this command. This confirms the tables of mysql.

$ go-check-database-tables ls -H 192.168.33.10 -p 3306 -d mysql -u root -P root -n mysql 
+---------------------------+
|        TABLE NAME         |
+---------------------------+
| columns_priv              |
| db                        |
| event                     |
+---------------------------+

go-check-database-tables's People

Contributors

hlts2 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.