{"action":"created","issue":{"url":"https://api.github.com/repos/chef-cookbooks/mysql/issues/466","repository_url":"https://api.github.com/repos/chef-cookbooks/mysql","labels_url":"https://api.github.com/repos/chef-cookbooks/mysql/issues/466/labels{/name}","comments_url":"https://api.github.com/repos/chef-cookbooks/mysql/issues/466/comments","events_url":"https://api.github.com/repos/chef-cookbooks/mysql/issues/466/events","html_url":"https://github.com/chef-cookbooks/mysql/issues/466","id":175559714,"number":466,"title":"mysql-server-5.7.postinst fails after running apt-get upgrade","user":{"login":"sauberia","id":99816,"avatar_url":"https://avatars.githubusercontent.com/u/99816?v=3","gravatar_id":"","url":"https://api.github.com/users/sauberia","html_url":"https://github.com/sauberia","followers_url":"https://api.github.com/users/sauberia/followers","following_url":"https://api.github.com/users/sauberia/following{/other_user}","gists_url":"https://api.github.com/users/sauberia/gists{/gist_id}","starred_url":"https://api.github.com/users/sauberia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sauberia/subscriptions","organizations_url":"https://api.github.com/users/sauberia/orgs","repos_url":"https://api.github.com/users/sauberia/repos","events_url":"https://api.github.com/users/sauberia/events{/privacy}","received_events_url":"https://api.github.com/users/sauberia/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-09-07T17:21:41Z","updated_at":"2016-10-27T14:27:32Z","closed_at":null,"body":"### Cookbook version\r\n7.1.1\r\n\r\n### Chef-client version\r\n12.10.24\r\n\r\n### Platform Details\r\nUbuntu 16.04.1 LTS\r\n\r\n### Scenario:\r\nAttempt to upgrade the mysql-server-5.7 package\r\n\r\n### Steps to Reproduce:\r\n\r\nMy recipe is as follows:\r\n\r\n````ruby\r\n  mysql_service 'default' do\r\n    initial_root_password 'changeme'\r\n    action [:create, :start]\r\n  end\r\n\r\n  mysql_client 'default' do\r\n    action :create\r\n  end\r\n````\r\n\r\nThis all worked as expected.\r\n\r\nA few weeks later I ran apt-get upgrade which didn't complete as the mysql-server-5.7.postinst  script fails.\r\n\r\n### Expected Result:\r\nThe mysql-server-5.7 package is successfully upgraded.\r\n\r\n### Actual Result:\r\n\r\nmysql-server-5.7.postinst fails during the upgrade process with the following output:\r\n\r\n````\r\n  + mysql_upgrade --defaults-file=/etc/mysql/debian.cnf\r\n  mysql_upgrade: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) while connecting to the MySQL server\r\n  Upgrade process encountered error and will not continue.\r\n  + result=11\r\n  + '[' 11 -ne 0 -a 11 -ne 2 ']'\r\n  + echo 'mysql_upgrade failed with exit status 11'\r\n  mysql_upgrade failed with exit status 11\r\n  + exit 1\r\n  dpkg: error processing package mysql-server-5.7 (--configure):\r\n   subprocess installed post-installation script returned error exit status 1\r\n  Errors were encountered while processing:\r\n   mysql-server-5.7\r\n  E: Sub-process /usr/bin/dpkg returned an error code (1)\r\n````\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/chef-cookbooks/mysql/issues/comments/256657173","html_url":"https://github.com/chef-cookbooks/mysql/issues/466#issuecomment-256657173","issue_url":"https://api.github.com/repos/chef-cookbooks/mysql/issues/466","id":256657173,"user":{"login":"Tealc002","id":23101627,"avatar_url":"https://avatars.githubusercontent.com/u/23101627?v=3","gravatar_id":"","url":"https://api.github.com/users/Tealc002","html_url":"https://github.com/Tealc002","followers_url":"https://api.github.com/users/Tealc002/followers","following_url":"https://api.github.com/users/Tealc002/following{/other_user}","gists_url":"https://api.github.com/users/Tealc002/gists{/gist_id}","starred_url":"https://api.github.com/users/Tealc002/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tealc002/subscriptions","organizations_url":"https://api.github.com/users/Tealc002/orgs","repos_url":"https://api.github.com/users/Tealc002/repos","events_url":"https://api.github.com/users/Tealc002/events{/privacy}","received_events_url":"https://api.github.com/users/Tealc002/received_events","type":"User","site_admin":false},"created_at":"2016-10-27T14:27:32Z","updated_at":"2016-10-27T14:27:32Z","body":"What helped for me was running 'systemctl enable mysql' and running 'apt-get install -f' again."}}
{"actor":{"display_login":"Tealc002"}}