Skip to content

Instantly share code, notes, and snippets.

@jcuenod
Created May 23, 2019 23:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcuenod/a052e87d70dda88e9b6d224e08058609 to your computer and use it in GitHub Desktop.
Save jcuenod/a052e87d70dda88e9b6d224e08058609 to your computer and use it in GitHub Desktop.
Dump mysql table descriptions of all tables in db to tab separated file
mysql -h 127.0.0.1 -P 3306 db_name -u foo --password=bar -e "SELECT TABLE_NAME, COLUMN_NAME, COLUMN_TYPE FROM information_schema.columns WHERE table_schema = 'db_name';" > out.tsv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment