{"id":6475,"date":"2017-02-11T17:08:46","date_gmt":"2017-02-11T09:08:46","guid":{"rendered":"http:\/\/rmohan.com\/?p=6475"},"modified":"2017-02-11T17:08:46","modified_gmt":"2017-02-11T09:08:46","slug":"no-mysql-root-access-when-installing-galera-from-binaries-on-centos-7","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=6475","title":{"rendered":"No MySQL root access when installing Galera from binaries on CentOS 7"},"content":{"rendered":"<div class=\"entry-content\">\n<p>EDIT: I AM the one who is stupid! Arrrrgh. Just installed Galera on yet another box and saw this passing by in yum:<\/p>\n<p><code>A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER !<br \/>\nYou will find that password in '\/root\/.mysql_secret'.<\/code><\/p>\n<p>Arrrrghhhh. Apologies to the RPM packagers. EDIT END.<\/p>\n<p>Stupid RPM packagers screwed up. If you follow this how-to \u2013 <a href=\"http:\/\/galeracluster.com\/documentation-webpages\/gettingstarted.html\">http:\/\/galeracluster.com\/documentation-webpages\/gettingstarted.html<\/a> \u2013 after a while you end up at a point where it says \u201cIn the database client, run the following query: <code>SHOW STATUS LIKE 'wsrep_cluster_size';<\/code> \u2026so you try \u201cmysql -p\u201d only to find that you don\u2019t have access. WTF. There\u2019s probably already a password set by the RPM packagers but we don\u2019t know it. So, we try our usual \u2013skip-grant-tables thing and then try <code>SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPass');<\/code> but this will result in: \u201c<code>ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement<\/code>\u201d \u2013 WTF again. When you are used to resetting MySQL root pw\u2019s you usually first run the PW change command (SET or ALTER or UPDATE or whatever) and then you enter FLUSH PRIVILEGES. The trick here is to do the opposite. First enter<\/p>\n<p><code>mysql&gt; FLUSH PRIVILEGES;<br \/>\nQuery OK, 0 rows affected (0.00 sec)<\/code><\/p>\n<p><code>mysql&gt; SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPass');<br \/>\nQuery OK, 0 rows affected (0.00 sec)<\/code><\/p>\n<p>Found this here after hours of troubleshooting: <a href=\"http:\/\/galeracluster.com\/community\/?place=msg%2Fcodership-team%2Fw8NEekKipwY%2FgGlkSQNOedMJ\">http:\/\/galeracluster.com\/community\/?place=msg%2Fcodership-team%2Fw8NEekKipwY%2FgGlkSQNOedMJ<\/a><br \/>\nF*CKERS!<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"\n<p>EDIT: I AM the one who is stupid! Arrrrgh. Just installed Galera on yet another box and saw this passing by in yum:<\/p>\n<p>A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER ! You will find that password in &#8216;\/root\/.mysql_secret&#8217;.<\/p>\n<p>Arrrrghhhh. Apologies to the RPM packagers. EDIT END.<\/p>\n<p>Stupid RPM packagers screwed [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,73],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6475"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6475"}],"version-history":[{"count":2,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6475\/revisions"}],"predecessor-version":[{"id":6477,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6475\/revisions\/6477"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6475"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6475"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6475"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}