Skip to content

Artea/sqlseer

 
 

Repository files navigation

Sqlseer Flattr this

Simple, yet powerful, MySQL report generator. Reports can be saved to .csv, .html, .txt, .xls, and .xml formats.
To see Sqlseer in action, please visit sqlseer.smithii.com

Quick Start

First, install any dependencies that are needed. Then, install sqlseer:

git clone https://github.com/rasa/sqlseer
cd sqlseer
cp app/configs/dbconfig.ini.example app/configs/dbconfig.ini
vi app/configs/dbconfig.ini # add your database credentials
composer install

To secure your database credentials, run:

chmod 640 app/configs/dbconfig.ini
chgrp www-data app/configs/dbconfig.ini 

replacing www-data with the group of your web server.

For the SQL scripts in www/test-reports to work, the MySQL user will need to have CREATE/INSERT/DROP rights on the test database. The database does not need to be created beforehand.

One way to do this, is via the sample_data/create-sqlseer-user.sql script:

cd sample_data
mysql -uuser -ppassword <create-sqlseer-user.sql

Lastly, set up your web server to point to sqlseer/www. For example, with Apache 2.3 or earlier, use:

<VirtualHost *:80>
   ServerName sqlseer
   DocumentRoot /path/to/sqlseer/www

   <Directory /path/to/sqlseer/www>
       AllowOverride All
       Order allow,deny
       Allow from all
   </Directory>
</VirtualHost>

With Apache 2.4, use:

<VirtualHost *:80>
   ServerName sqlseer
   DocumentRoot /path/to/sqlseer/www

   <Directory /path/to/sqlseer/www>
       AllowOverride All
       Require all granted
   </Directory>
</VirtualHost>

Sample Data

To load the MySQL employee, sakila and world sample databases, install make, and then type:

cd sample_data
make MYSQL_OPTS="-u user -ppassword"
make distclean

where user is the MySQL username, and password is that user's password.

To remove the employee, sakila, and world databases, type:

make drop MYSQL_OPTS="-u user -ppassword"

Export Formats

SqlSeer can export in the following formats:

  • Comma separated values (.csv)
  • HTML (.html)
  • Plain Text (tab separated values) (.txt)
  • Microsoft Excel (.xls)
  • XML (.xml) (Same as mysql --xml output)
  • Zip (.zip)

Dependencies

SqlSeer depends on the following:

Install Apache

To install Apache in Debian and Debian derivatives, type:

sudo apt-get install apache2

Install PHP

To install PHP in Debian and Debian derivatives, type:

sudo apt-get install php5

Install Composer

To install Composer in ~/bin type:

curl -sS https://getcomposer.org/installer | php -- --install-dir=~/bin --filename=composer

To install Composer in /usr/local/bin type:

curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer

Contributing

To contribute to this project, please see CONTRIBUTING.md.

Bugs

To view existing bugs, or report a new bug, please see issues.

Changelog

To view the version history for this project, please see CHANGELOG.md.

License

This project is MIT licensed.

Contact

This project was created and is maintained by Ross Smith II endorse

Feedback, suggestions, and enhancements are welcome.

About

Easily view, sort, filter, and download SQL data, using GUI, or custom written SQL or PHP.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 91.6%
  • Shell 4.5%
  • HTML 2.8%
  • Other 1.1%