Django安裝及簡單使用參考
https://blog.csdn.net/Jack_wise/article/details/80690826
在安裝數據庫時,遇到
Python3.x 使用pip install MySQL-python 時報
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in position 24: invalid continuation byte
解決辦法:Python3.x 使用pip install pylint時報UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xd5
並且對於python3,最好不要使用
pip install MySQL-python
而是
pip install MySQL-python
參考:building ‘_mysql’ extension error: [WinError 2] 系統找不到指定的文件
安裝數據庫連接後,進行連接
出現以下問題,大概率是數據庫服務爲開啓,轉到服務中開啓數據庫服務
MySQLdb._exceptions.OperationalError: (2002, "Can't connect to MySQL server on '127.0.0.1' (10061)")
啓動數據庫服務後,需要手動在數據庫中創建對應的數據庫,否則會出現
django.db.utils.OperationalError: (1049, "Unknown database 'testcon'")