Skip to content

Export MySQL Db content into a big HTML file. `mysqldb2html dbname > /path/to/output.html`

Notifications You must be signed in to change notification settings

elvisciotti/mysqldb2html

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

MySQL DB 2 HTML

A simple bash script to export the MySQL DB tables content into an HTML file.

Common use case: create a database with MySQL views you need to monitor and send the full content via mail as a report (see a linux cron table example below).

It can be easily modified to work with single tables if you need to, with an additional parameter, send a pull request in case

Usage and setup

  • mysqldb2html

  • Pipe output into file

    mysqldb2html dbname > /path/to/output.html

  • Crontab entry to mail db content into a midnight mail.

    0 0 * * * /usr/local/bin/mysqldb2html yourdbname | mail -s 'database report' -a 'Content-Type: text/html' your@mail.com

Rebuild DEB package

chmod +x mysqldb2html/usr/local/bin/mysqldb2html
dpkg --build mysqldb2html/

Install DEB package

wget https://github.com/elvisciotti/mysqldb2html/raw/master/mysqldb2html.deb
sudo dpkg -i mysqldb2html.deb

About

Export MySQL Db content into a big HTML file. `mysqldb2html dbname > /path/to/output.html`

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages