MAC OS 기준 강의 -> Windows 기준 변경 방법
C:\Program Files\MySQL\MySQL Server 5.6\bin
cmd
mysql -u root -p -t < employees.sql
MySQL 5.6 Command Line Client - Unicode
DB 확인
+--------------------+
| Database |
+--------------------+
| information_schema |
| employees |
| mysql |
| performance_schema |
| sakila |
| test |
| world |
+--------------------+
8 rows in set (0.00 sec)
# settings.py
DATABASES = {
'default' : {
'ENGINE' : 'django.db.backends.mysql' , # mysql 엔진
'NAME' : 'employees' , # DB이름
'USER' : 'root' , # User 이름(기본 root)
'PASSWORD' : '1q2w3e4r5t' , # User 패스워드
'HOST' : 'localhost' , # 호스트
'PORT' : '3306' # 포트
}
}
Operations to perform :
Apply all migrations : admin , auth , contenttypes , sessions
Running migrations :
Applying contenttypes .0001_ initial ... OK
Applying auth .0001_ initial ... OK
Applying admin .0001_ initial ... OK
Applying admin .0002_l ogentry_remove_auto_add ... OK
Applying admin .0003_l ogentry_add_action_flag_choices ... OK
Applying contenttypes .0002_ remove_content_type_name ... OK
Applying auth .0002_ alter_permission_name_max_length ... OK
Applying auth .0003_ alter_user_email_max_length ... OK
Applying auth .0004_ alter_user_username_opts ... OK
Applying auth .0005_ alter_user_last_login_null ... OK
Applying auth .0006_ require_contenttypes_0002 ... OK
Applying auth .0007_ alter_validators_add_error_messages ... OK
Applying auth .0008_ alter_user_username_max_length ... OK
Applying auth .0009_ alter_user_last_name_max_length ... OK
Applying auth .0010_ alter_group_name_max_length ... OK
Applying auth .0011_ update_proxy_permissions ... OK
Applying sessions .0001_ initial ... OK
python manage .py inspectdb > fastadmin / models .py