Answer the question
In order to leave comments, you need to log in
How to connect to my database via pythonanywhere site?
There is a bot written in python. I want him to take information from the database that is on the computer. Other people can connect to it and edit it, which means you can connect to it remotely. But through the bot that is on the pythonanywhere site, I can’t connect, although the same code in pycharm works without errors.
Here is the code
import pymssql
conn = pymssql.connect(server='Мой ip', user='admin', password='123', database='VKbot')
cursor = conn.cursor()
cursor.execute('SELECT login'
' FROM dbo.Authentication')
result = cursor.fetchall()
print(result)
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