django执行python manage.py makemigrations时报Access denied for user 'root'@'localhost',搞了我整整两晚上,终于解决了!!!
报错如下 :
E:\pythonStudy\myPythonProject\django180513\project>python manage.py makemigrations
Traceback (most recent call last):File "C:\Users\E570\Anaconda3\Lib\site-packages\django\db\backends\base\base.py", line 213, in ensure_connection
self.connect()
File "C:\Users\E570\Anaconda3\Lib\site-packages\django\db\backends\base\base.py", line 189, in connect
self.connection = self.get_new_connection(conn_params)
File "C:\Users\E570\Anaconda3\Lib\site-packages\django\db\backends\mysql\base.py", line 274, in get_new_connection
conn = Database.connect(**conn_params)
File "C:\Users\E570\Anaconda3\Lib\site-packages\pymysql\__init__.py", line 90, in Connect
return Connection(*args, **kwargs)
File "C:\Users\E570\Anaconda3\Lib\site-packages\pymysql\connections.py", line 704, in __init__
self.connect()
File "C:\Users\E570\Anaconda3\Lib\site-packages\pymysql\connections.py", line 974, in connect
self._request_authentication()
File "C:\Users\E570\Anaconda3\Lib\site-packages\pymysql\connections.py", line 1203, in _request_authentication
auth_packet = self._read_packet()
File "C:\Users\E570\Anaconda3\Lib\site-packages\pymysql\connections.py", line 1059, in _read_packet
packet.check_error()
File "C:\Users\E570\Anaconda3\Lib\site-packages\pymysql\connections.py", line 384, in check_error
err.raise_mysql_exception(self._data)
File "C:\Users\E570\Anaconda3\Lib\site-packages\pymysql\err.py", line 109, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.OperationalError: (1045, "Access denied for user 'root'@'localhost' (using password: YES)")
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "C:\Users\E570\Anaconda3\Lib\site-packages\django\core\management\__init__.py", line 363, in execute_from