Answer the question
In order to leave comments, you need to log in
Why connection problems in Mysql?
The problem with bots in VKontakte. The bot works together with mysql and connects through another account, not through root. For some time everything works fine, from an hour to a day, but in the end, then the bot just stops responding and such an error pops up, after restarting the server everything continues to work as it should. How do I fix this, I can't have the bot restart all the time
[VKBottle] While bot worked error occurred
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/pymysql/connections.py", line 583, in connect
**kwargs)
File "/usr/lib/python3.7/socket.py", line 728, in create_connection
raise err
File "/usr/lib/python3.7/socket.py", line 716, in create_connection
sock.
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/vkbottle/framework/bot/bot. py", line 358, in emulate
await self._processor(obj, client_info)
File "/usr/lib/python3.7/site-packages/vkbottle/framework/bot/processor.py", line 70, in _processor
task = await rules[0].call(*args, **kwargs)
File "main.py", line 693, in city
if check_training(ans.from_id):
File "main.py", line 37, in check_training
conn = get_connection ()
File "main.py", line 22, in get_connection
charset='utf8mb4'
File "/usr/lib/python3.7/site-packages/pymysql/__init__.py", line 94, in Connect
return Connection(*args, **kwargs)
File "/usr/lib/python3.7/site- packages/pymysql/connections.py", line 325, in __init__
self.connect()
File "/usr/lib/python3.7/site-packages/pymysql/connections.py", line 630, in connect
raise exc
pymysql. err.OperationalError: (2003, "Can't connect to MySQL server on 'localhost' ([Errno 111] Connection refused)")
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question