Conecting to MySQL
Michael Torrie
torriem at gmail.com
Sun Aug 14 21:35:54 EDT 2022
On 8/8/22 19:26, Guilherme Campos wrote:
> Hello folks,
>
> trying to connect to MYSQL it appears the error msg below:
> InterfaceError: 2003: Can't connect to MySQL server on 'localhost:3306'
> (111 Connection refused)
> [image: conexao.png]
> How can i fix that.?
MySQL can listen on a local unix socket (named pipe in Windows), an
internet TCP/IP port, or both. If your MySQL is running, it could be
listening on the local socket or named port, which has a different url
than localhost:3306. MySQL can be configured to also listen on a TCP/IP
port, which is what you code is apparently expecting.
Although the fact that your MySQL Workbench cannot connect either
suggests that MySQL is not running at all.
Configuring MySQL is a bit beyond the scope of this list, although I'm
sure there are people here who know how to do it. What OS are you using?
More information about the Python-list
mailing list