問題タブ [django-mysql]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
mysql - AWS EC2 で実行されている MySql にローカルの django プロジェクトを接続することは可能ですか? どのように?
私が試したこと:
- EC2 インスタンスに MySql サーバーをインストールしました。
- インスタンスのセキュリティ グループに、すべてのソースから shh 経由で接続するためのインバウンド ルールを追加しました。
- データベースとユーザーを作成しました
- そのユーザーに次を使用するすべての権限を与える
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
django-admin startproject mysite
mysqlclientを使用して Django プロジェクトを作成し、インストールしました- プロジェクト設定で、デフォルトのデータベースを SQLite から
今実行するpython manage.py runserver
とエラーが表示されます
次に、次を使用して、この特定の IP にもすべての権限を付与しました。GRANT ALL PRIVILEGES ON *.* TO 'root'@'xxx.xx.xxx.xxx' WITH GRANT OPTION;
それでもうまくいきません。同じエラーです。
python - my user_id profile database is null, how i insert the value in user_id?
Why does my data look like this?
can i make the value in user_id? if i delete the def create_user_profile it will create nama, nik, email, nomor_hp. but user_id is null
in the picture, id 1 and 2 i created without def create_user_profile and id 3,4,5,6 is created when i user def create_user_profile
this is my models.py
this is my views.py to create a user, did i made a mistake here?