Home > Database > Mysql Tutorial > body text

_mysql_exceptions.OperationalError: (2003, "Can&

WBOY
Release: 2016-06-07 15:46:24
Original
1502 people have browsed it

在连接数据库中,出现_mysql_exceptions.OperationalError: (2003, Can't connect to MySQL server on 'localhost' (10061)),如下错误,但数据库连接中的用户名,密码即各项setting.py文件中的配置是正确的,但却报错。如图所示: 解决办法是,将‘HOST’:

在连接数据库中,出现_mysql_exceptions.OperationalError: (2003, "Can't connect to MySQL server on 'localhost' (10061)"),如下错误,但数据库连接中的用户名,密码即各项setting.py文件中的配置是正确的,但却报错。如图所示:

_mysql_exceptions.OperationalError: (2003, "Can&


解决办法是,将‘HOST’:‘localhost’改为 ‘HOST’:‘127.0.0.1’,具体原因,不清楚,但修改过后,可执行syncdb ,如图所示:

_mysql_exceptions.OperationalError: (2003, "Can&



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!