《Pathon 项目开发案例集锦》第17章 51shop 在创建迁移脚本:
python manage.py db migrate
时出现错误,请答疑,以下是CMD下截屏(因字数此文本框字数不能超1000在中间用。。。省略)。谢谢!
(venv) F:\pythonproject\Shop>python manage.py db migrate
Traceback (most recent call last):
File "F:\pythonproject\Shop\venv\lib\site-packages\sqlalchemy\engine\base.py", line 2158, in _wrap_pool_connect
return fn()
File "F:\pythonproject\Shop\venv\lib\site-packages\sqlalchemy\pool.py", line 342, in unique_connection
return _ConnectionFairy._checkout(self)
File "F:\pythonproject\Shop\venv\lib\site-packages\sqlalchemy\pool.py", line 788, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "F:\pythonproject\Shop\venv\lib\site-packages\sqlalchemy\pool.py", line 529, in checkout
rec = pool._do_get()
。。。
File "F:\pythonproject\Shop\venv\lib\site-packages\pymysql\protocol.py", line 220, in check_error
err.raise_mysql_exception(self._data)
File "F:\pythonproject\Shop\venv\lib\site-packages\pymysql\err.py", line 109, in raise_mysql_exception
raise errorclass(errno, errval)
sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (1045, "Access denied for user 'root'@'localhost' (using password: YES)") (Background on this error at: http://sqlalche.me/e/e3q8)
(venv) F:\pythonproject\Shop>