Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pyrech/csv-explorer
Load a big CSV into a MySQL database and explore it with PHPMyAdmin
https://github.com/pyrech/csv-explorer
csv explorer leak mysql phpmyadmin sql
Last synced: about 2 months ago
JSON representation
Load a big CSV into a MySQL database and explore it with PHPMyAdmin
- Host: GitHub
- URL: https://github.com/pyrech/csv-explorer
- Owner: pyrech
- License: mit
- Created: 2021-02-26T07:55:01.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-04-09T17:34:05.000Z (almost 4 years ago)
- Last Synced: 2024-10-27T03:49:35.905Z (3 months ago)
- Topics: csv, explorer, leak, mysql, phpmyadmin, sql
- Language: Shell
- Homepage:
- Size: 2.93 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CSV explorer
You need to browse a big CSV but Office/OpenOffice/LibreOffice does not accept to load a CSV of 100+ MB?
Use this tool to load the CSV into a MySQL database and explore the data with PHPMyAdmin.## Load the data
Put your CSV file into the [files/](files/) directory
```bash
mv myleak.csv files/myleak.csv
```Start MySQL database and PHPMyAdmin:
```bash
docker-compose up -d
```Load the data into the database:
```bash
docker-compose run mysql bash -c "./loaddata.sh files/myleak.csv"
```>Note: This step can take up to one min for a CSV of 400 MB
## Explore the data
You can open [127.0.0.1:8080/](http://127.0.0.1:8080/) in your browser to access PHPMyAdmin.
Defaut credentials are `root` / `yolo`.
You can now browse your data by querying the `explorer.data` table.If you prefer to explore over CLI, you can run the following command instead to open a MySQL shell:
```bash
docker-compose run mysql mysql -h mysql -u root -pyolo explorer
``````sql
SELECT * FROM data WHERE ...
```## Remove everything
Finish to explore the data? You can delete everything by running the following command:
```bash
docker-compose down --remove-orphans --volumes --rmi=local
```