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
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>
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"
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)
SqlSeer depends on the following:
To install Apache in Debian and Debian derivatives, type:
sudo apt-get install apache2
To install PHP in Debian and Debian derivatives, type:
sudo apt-get install php5
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
To contribute to this project, please see CONTRIBUTING.md.
To view existing bugs, or report a new bug, please see issues.
To view the version history for this project, please see CHANGELOG.md.
This project is MIT licensed.
This project was created and is maintained by Ross Smith II
Feedback, suggestions, and enhancements are welcome.