I'm a beginner who recently started to touch python and raspberry pi.
I'm very sorry for the amateur question because I don't understand the concept, but I would like to build the following system.
・ PC used
Child, raspberry pi ① (instead of QRcode reader)
Parent, raspberry pi② (or desktop PC)
Recognize products with QR code in 1 and ①
Register the data recognized in 2, ① with the python code in the SQL database of ② on the local network via Wi-Fi.
3, Communicate from ① to ② to display the registered database
I cannot imagine the environment required at this time.
I used to play with PHP and MySQL using XAMPP, and at that time I was connected to MySQL (phpMyAdmin) on the same PC.
However, is it possible to connect to XAMPP running on the parent PC from another PC via Wi-Fi like this time and play with MySQL on the parent PC from the GUI of python started on the child PC?
It may be difficult to express your intentions in words due to lack of knowledge, but please teach.
Answer # 1
It is possible, but it is easy to get caught in the following points.
There may be security settings that prevent Wifi devices from communicating with each other due to the Wifi router function. In that case, disable it. For Buffalo: What is the privacy separator function?
Open the port (3306 by default) used by MySQL for the firewall of the Raspberry Pi or desktop PC in (2) where MySQL is running.
Since the MySQL user needs to specify the connection source IP, specify the connection permission IP correctly when creating the MySQL user for ① (or create a user that can be accessed from anywhere)
Especially if it gets stuck at 1, it will not connect no matter how much the setting is changed on the OS side, so
First of all, it is easy to separate by connecting by wire and confirming that there is no problem, and then connecting by Wifi.
Answer # 2
Is possible. Until now for DB settings
locahostDo you remember that you put it in? If you set that to the host name or IP address of raspberry pi ②, you can communicate without problems. Moreover, if it is in the local network and the rasberry pi is supported by the router
You can also access it with a domain name such as. So what you do
② Decide the machine name
(2) Install and start the MySQL server in
In the DB host name of the application of ①
Only this. Rather, it's just that things that are originally separated in this way are started together on localhost because it is troublesome at the time of development.
Answer # 3
- python - i can't connect to mysql on aws (cloud9)
- python - i forgot my mysql root password in my mac local environment
- is it possible to connect to an external db via odbc like the access link table in sql server?
- python - what if i can't connect with connect timeout?
- python - when converting from webm to mp4, the conversion is possible but combined
- python - whether scraping is possible
- mysql won't start/error 2002 (hy000): can't connect to local mysql server through socket'/tmp/mysqlsoc
- i want to connect to mysql of sakura vps from local laravel by ssh
- i want to build an express + mysql environment on docker, but i can't connect to mysql within the launched app error: connect ec
- php - how to bindparam $_session to mysql (xampp) prepare
- is it possible to replace uwsc with python altogether?
- i want to connect to 64-bit ms access from 32-bit python
- cannot connect to mysql database on docker with postico
- amazon ec2 - it is possible to connect from laravel to google translate locally, but an error occurs from ec2
- python - i want to connect the images in two folders in order
- i want to connect to postgresql from python, but i get an error
- can't connect to local mysql server through socket'/var/lib/mysql/mysqlsock' (2) error
- i can't connect to mysql
- python : Peewee generates a faithful request, but turning to the database does not return anything, although if you insert this
- python : INLINE BUTTON Telegram-Bot-API
- Record LIKE in MySQL + Telegram-Bot-API + Python
- python : No response from MySQL on Ubuntu Server (Virtual Machine)
- Python + MySQL + Telegram Bot: Bot completes the work in five minutes if you use without breaks work normally