## Usage
```
mysql-to-json [-h] [-d DATABASE] [-H HOSTNAME] [-P PORT] [-u USER] [-p]
[-e QUERY]
optional arguments:
-h, --help show this help message and exit
-d DATABASE, --database DATABASE
MySQL database name.
-H HOSTNAME, --hostname HOSTNAME
MySQL host name.
-P PORT, --port PORT MySQL port number.
-u USER, --user USER MySQL username.
-p, --password Shh! It's a secret.
-e QUERY, --query QUERY
Query to run.
```
## Examples
All examples simple select all table information from `information_schema` and save it to `tables.json`
### Simple
This assumes we have full access to the mysql database from localhost.
```
$> mysql-to-json -e 'SELECT * FROM information_schema.tables' > tables.json
```
### Medium Complexity
This explicitly sets a user and asks for a password, while still connecting to localhost.
```
$> mysql-to-json -d mysql -u seth -p -e 'SELECT * FROM information_schema.tables' > tables.json
```
### All The Things!
This explicitly sets every command line option available.
```
$> mysql-to-json -h mydbserver.myhost.com -P 3306 -d mysql -u seth -p -e 'SELECT * FROM information_schema.tables' > tables.json
```
Metadata
Release files for mysql-to-json 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mysql-to-json-1.0.0.tar.gz | 2.7 kB | Without provenance | Details for mysql-to-json-1.0.0.tar.gz |
Release files / mysql-to-json-1.0.0.tar.gz
| Download URL | mysql-to-json-1.0.0.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5c2085709fe900cc412a5afd8a681bf65ec348fc1706cb3c73c69666af4b3c94
|
|
BLAKE2b-256 checksum How to use checksums |
cd142a1eb38a53a8288ad75155f49c9790a4d6de6505c4795b503c8a12cde898
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for mysql-to-json 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.