V
V
voltfeX2020-04-16 11:56:52
Python
voltfeX, 2020-04-16 11:56:52

How to use a database in a bot for Telegram?

Hello!
Who can tell me how to connect a database to mysql, to the telegram bot code, that is,
I downloaded mamp and created the necessary database there, and I want me to take information from there, someone has information on how to connect the database
Thanks for the answer

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
Timur Pokrovsky, 2020-04-16
@voltfeX

https://khashtamov.com/ru/mysql-python/
https://python-scripts.com/pymysql
https://python-scripts.com/database

N
Nikolay, 2020-04-16
@SODINNER

I recommend not mysql for such purposes, but sqlite3, it is much easier to use, it saves everything in one file and personally, as for me, especially for bots, it is ideal, you don’t need to raise the mysql server, but everything at once in python code.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question