{"id":4318756,"date":"2013-11-14T17:29:49","date_gmt":"2013-11-14T17:29:49","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/debugging-hyperdb\/"},"modified":"2016-08-21T12:34:32","modified_gmt":"2016-08-21T12:34:32","slug":"debugging-hyperdb","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/debugging-hyperdb\/","title":{"rendered":"Debugging HyperDB"},"content":{"rendered":"<p>I am looking for some advice on how to debug an apparently non-functioning deployment of HyperDB. With it turned on we can&#8217;t make changes.<\/p>\n<p>WordPress 3.6.1 files reside on a NAS shared by 2 RHEL 6.4 servers running the shipping rpms for php (5.3.3), Apache (2.2) and MySQL (5.1.6) server, with the WP install as DocumentRoot. We are using master-slave MySQL replication to provide read\/write on node1 and read only on node 2. Replication tests good, as does writing and reading to the appropriate node. But if we turn on HyperDB we can&#8217;t write.<\/p>\n<p>Before enabling HyperDB we made sure that a wpdbuser@localhost and wpdbuser@%.example.com user existed in mysql.user and that user could log into MySQL from either node. Our db-config.php looks like this:<\/p>\n<p><code><br \/>\n$wpdb-&gt;add_database(array(<br \/>\n        'host'     =&gt; 'node1.example.com',<br \/>\n        'user'     =&gt; DB_USER,<br \/>\n        'password' =&gt; DB_PASSWORD,<br \/>\n        'name'     =&gt; DB_NAME,<br \/>\n        'write'    =&gt; 1,<br \/>\n        'read'     =&gt; 1,<br \/>\n));<br \/>\n$wpdb-&gt;add_database(array(<br \/>\n        'host'     =&gt; DB_HOST,<br \/>\n        'user'     =&gt; DB_USER,<br \/>\n        'password' =&gt; DB_PASSWORD,<br \/>\n        'name'     =&gt; DB_NAME,<br \/>\n        'write'    =&gt; 0,<br \/>\n        'read'     =&gt; 1,<br \/>\n));<br \/>\n<\/code><\/p>\n<p>I&#8217;m looking more for a checklist or basic guidelines for debugging rather than a complete solution to my problem, because as we all know whatever bit you today is likely to look completely different tomorrow.<\/p>\n<p>https:\/\/wordpress.org\/plugins\/hyperdb\/<\/p>\n","protected":false},"template":"","class_list":["post-4318756","topic","type-topic","status-closed","hentry","topic-tag-debugging"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/4318756","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/4318756\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=4318756"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}