Connect to MySQL with Python on Raspberry Pi

I wanted to insert the TWE-Lite sensor value into the table, so prepare for it.

Only one command

$ sudo pip install PyMySQL

If the above does not work, install the following

$ sudo pip install mysql-connector-python-rf

With this alone, the DB related described in the source will work. that's all.

Recommended Posts

Connect to MySQL with Python on Raspberry Pi
Connect to MySQL with Python within Docker
Connect python to mysql
Connect Raspberry Pi to Alibaba Cloud IoT Platform with Python
Working with GPS on Raspberry Pi 3 Python
Connect to BigQuery with Python
Connect to Wikipedia with Python
Use python on Raspberry Pi 3 to light the LED with switch control!
Try debugging Python on Raspberry Pi with Visual Studio.
Yum command to access MySQL with Python 3 on Linux
Ubuntu 20.04 on raspberry pi 4 with OpenCV and use with python
Output to "7-segment LED" using python on Raspberry Pi 3!
Use vl53l0x with Raspberry Pi (python)
[Raspberry Pi] Changed Python default to Python3
Update Python for Raspberry Pi to 3.7 or later with pyenv
Connect to mysql
Connect two USB cameras to Raspberry Pi 4
Detect "brightness" using python on Raspberry Pi 3!
Programming normally with Node-RED programming on Raspberry Pi 3
Connecting from python to MySQL on CentOS 6.4
Run servomotor on Raspberry Pi 3 using python
Working with sensors on Mathematica on Raspberry Pi
Connect to pepper with PEPPER Mac's python interpreter
Detect temperature using python on Raspberry Pi 3!
How to play music (wav / mp3) files on Raspberry Pi python
Discord bot with python raspberry pi zero with [Notes]
Strategy on how to monetize with Python Java
GPGPU with Raspberry Pi
Detect slide switches using python on Raspberry Pi 3!
Detect analog signals with A / D converter using python on Raspberry Pi 3!
Build a Django environment on Raspberry Pi (MySQL)
How to use Raspberry Pi pie camera Python
pigpio on Raspberry pi
I tried L-Chika with Raspberry Pi 4 (Python edition)
Try tweeting arXiv's RSS feed on twitter from Raspberry Pi with python
Detect magnet switches using python on Raspberry Pi 3!
Enjoy electronic work with GPIO on Raspberry Pi
Power on / off your PC with raspberry pi
Introduction to Python with Atom (on the way)
Get CPU information of Raspberry Pi with Python
Make DHT11 available on Raspberry Pi + python (memo)
Sound the buzzer using python on Raspberry Pi 3!
Play with your Ubuntu desktop on your Raspberry Pi 4
DigitalSignage with Raspberry Pi
Connect your Raspberry Pi to your smartphone using Blynk
Cython on Raspberry Pi
Build a Python development environment on Raspberry Pi
GPS tracking with Raspberry Pi 4B + BU-353S4 (Python)
Measure CPU temperature of Raspberry Pi with Python
Try to use up the Raspberry Pi 2's 4-core CPU with Parallel Python
From setting up Raspberry Pi to installing Python environment
Run LEDmatrix interactively with Raspberry Pi 3B + on Slackbot
Easy IoT to start with Raspberry Pi and MESH
I tried to implement Minesweeper on terminal with python
Try to visualize the room with Raspberry Pi, part 1
How to use the Raspberry Pi relay module Python
Control brushless motors with GPIOs on Raspberry Pi Zero
I want to AWS Lambda with Python on Mac!
Install pyenv on Raspberry Pi and version control Python
Troubleshoot with installing OpenCV on Raspberry Pi and capturing
Display USB camera video with Python OpenCV with Raspberry Pi