Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/exaluc/checkmysql
Check MySQL connection
https://github.com/exaluc/checkmysql
checker click connection monitor monitoring mysql python3
Last synced: 9 days ago
JSON representation
Check MySQL connection
- Host: GitHub
- URL: https://github.com/exaluc/checkmysql
- Owner: exaluc
- License: mit
- Created: 2020-02-12T23:19:22.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-07-09T21:49:20.000Z (over 1 year ago)
- Last Synced: 2024-09-15T00:27:30.997Z (2 months ago)
- Topics: checker, click, connection, monitor, monitoring, mysql, python3
- Language: Python
- Homepage:
- Size: 40 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# checkMySQL
> Check MySQL connectionPython3
## usage
OS X, Linux or Windows:
```sh
pip install -r requirements.txt
```pip package:
```sh
pip install checkmysql
```client:
```sh
checkmysql localhost root password sys 3306
┏━━━━━━━━━━━━━━━━━━━━━━━┓
┃ MySQL test connection ┃
┡━━━━━━━━━━━━━━━━━━━━━━━┩
│ host: localhost │
│ port: 3306 │
│ state: OK │
└───────────────────────┘checkmysql --help
Usage: checkmysql [OPTIONS] [HOST] [USER] [PASSWORD] [DB] [PORT]
```Python Class:
```python
from checkmysql.connector import MySQLConncon = MySQLConn.create('192.168.0.1', 'root', 'root_password', 'database_name', 3306)
res = con.fetch("select 1 as checkin;")if res[0].get('checkin', None) == 1:
print('db check ok')
else:
print('db check ko')
```## Requirements
* Typer
* rich
* PyMySQL## Meta
Lucian – [@exaluc](https://twitter.com/exaluc)
Distributed under the MIT license. See ``LICENSE`` for more information.
[checkMySQL](https://github.com/exaluc/checkMySQL)