Answer the question
In order to leave comments, you need to log in
What is the correct URI for mysql socket connection?
I'm trying to set up a connection to the database on the hosting, it says that the connection does not always work correctly via localhost, in my case it gives an error: sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (2003, "Can't connect to MySQL server on 'localhost=' ([Errno -2] Name or service not known)"). With this data:
"mysql+pymysql://root:[email protected]/dbname"
In the configuration instructions they write that it is better to use a socket connection, but there is an example in django. Therefore, I went to Google, found this article , but it did not help, I also tried to replace unix_socket with localhost, which also did not help.
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