Created
June 16, 2015 14:23
-
-
Save marceloleiva/2fd56f7642a122573e80 to your computer and use it in GitHub Desktop.
Conectar Django remotamente con MySQL en Vagrant
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/etc/mysql/my.cnf | |
bind-address = 0.0.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DATABASES = { | |
'default': { | |
'ENGINE': 'django.db.backends.mysql', | |
'NAME': 'db_name', | |
'USER': 'user_name', | |
'PASSWORD': 'password', | |
'HOST': '127.0.0.1', | |
'PORT': '9306' | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GRANT ALL ON *.* TO 'user_name'@'localhost'; | |
GRANT ALL ON *.* TO 'user_name'@'%'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.vm.box = "chef/ubuntu-14.04" | |
config.vm.network "private_network", ip: "192.168.33.10" | |
config.vm.network :forwarded_port, guest: 3306, host: 9306 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment