-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deploy cannot connect to mysql #27
Comments
This should be possible through just using the hostname
|
https://stackoverflow.com/a/29655281 might be relevant, not sure how much that would help. Does fabric need to connect from the machine you are deploying from, or does it connect from where the django app is being deployed to? |
Hm, it looks more like a deployed project issue than a fabric issue. The fabfile (https://github.com/compserv/hknweb/blob/deploy/fabfile.py) doesn’t do anything with MySQL. In hknweb/settings/common.py (https://github.com/compserv/hknweb/blob/863407747d1f4e0cbfb5212354c8f4eb5d37e8d9/hknweb/settings/common.py), the DATABASES variable should be responsible for the MySQL settings, but right now (I’m the deploy branch) I’ve only set HOST and NAME (the database name), and leaned on the MySQL config file hierarchy for user credentials. |
Fixed! eec0971 Among other things, I specified the mysql conf file at This does break the mysql connection on the Vagrant VM, however. |
Fabric attempts to connect through the default socket file:
/var/run/mysql/mysql.sock
. However this is non-existent on the OCF apphost.TODO: research how the default
mysql
command connects to the mariadb server, and setup django to use that instead of the socket. (Or find the socket file.)The text was updated successfully, but these errors were encountered: