{"id":1122,"date":"2018-03-21T11:32:06","date_gmt":"2018-03-21T11:32:06","guid":{"rendered":"http:\/\/www.haxed.me.uk\/?p=1122"},"modified":"2018-03-21T11:32:06","modified_gmt":"2018-03-21T11:32:06","slug":"fixing-phpmyadmin-connection-controluser-defined-configuration-failed","status":"publish","type":"post","link":"https:\/\/haxed.me.uk\/index.php\/2018\/03\/21\/fixing-phpmyadmin-connection-controluser-defined-configuration-failed\/","title":{"rendered":"Fixing phpmyadmin, Connection for controluser as defined in your configuration failed."},"content":{"rendered":"<p>This happens when the phpmyadmin package is installed, but for some reason or another the automation the package manager and phpmyadmin have for setting up the phpmyadmin user, and phpmyadmin database doesn&#8217;t properly use the table schema from \/usr\/share. Here is the process of fixing this error for those that get it.<\/p>\n<p>Create a database called phpmyadmin<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ncreate database phpmyadmin;\r\n<\/pre>\n<p>You can actually call the database anything as long as you remember what you changed it to later.<\/p>\n<p>Create a database user<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nMariaDB &#x5B;(none)]&gt; GRANT ALL PRIVILEGES ON phpmyadmin.* to phpmyadmin@localhost identified by 'AVERYSECUREpasswordgoeshere98123123sdabcsd123' ;\r\nQuery OK, 0 rows affected (0.00 sec)<\/pre>\n<p>Locate the create_tables.sql file copied by the package manager (or zip if installing from source)<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n\r\n&#x5B;root@linuxbox phpMyAdmin]# find \/usr\/share | grep create_table\r\n\/usr\/share\/phpMyAdmin\/sql\/create_tables.sql\r\n\/usr\/share\/phpMyAdmin\/sql\/create_tables_drizzle.sql\r\n\/usr\/share\/phpMyAdmin\/libraries\/display_create_table.lib.php\r\n\/usr\/share\/phpMyAdmin\/test\/libraries\/PMA_display_create_table_test.php\r\n<\/pre>\n<p>Import the database schema<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n# Check the file is correct\r\n&#x5B;root@wlinuxbox---wp phpMyAdmin]# vi \/usr\/share\/phpMyAdmin\/sql\/create_tables.sql\r\n\r\n# Import it\r\n&#x5B;root@wlinuxbox wp phpMyAdmin]# mysql -u root -p &lt; \/usr\/share\/phpMyAdmin\/sql\/create_tables.sql\r\nEnter password:\r\n<\/pre>\n<p>Afterwards you will need to make phpmyadmin aware of the creds in \/etc\/phpMyAdmin\/config.inc.php <\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nvi \/etc\/phpMyAdmin\/confing.inc.php\r\n<\/pre>\n<p>Confirm your changes<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n&#x5B;root@wd-linux-8---wp phpMyAdmin]# cat \/etc\/phpMyAdmin\/config.inc.php | grep -A3 phpmyadmin\r\n * wiki &lt;http:\/\/wiki.phpmyadmin.net&gt;.\r\n *\/\r\n\r\n\/*\r\n--\r\n$cfg&#x5B;'Servers']&#x5B;$i]&#x5B;'controluser']   = 'phpmyadmin';          \/\/ MySQL control user settings\r\n                                                    \/\/ (this user must have read-only\r\n$cfg&#x5B;'Servers']&#x5B;$i]&#x5B;'controlpass']   = 'AVERYSECUREpasswordgoeshere98123123sdabcsd123';          \/\/ access to the &quot;mysql\/user&quot;\r\n\r\n$cfg&#x5B;'Servers']&#x5B;$i]&#x5B;'pmadb']         = 'phpmyadmin'\r\n\r\n<\/pre>\n<p>Your work is done, and that pesky error is gone now phpmyadmin has it&#8217;s DB. This tutorial has been a long time coming as I see this all the time.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This happens when the phpmyadmin package is installed, but for some reason or another the automation the package manager and phpmyadmin have for setting up the phpmyadmin user, and phpmyadmin database doesn&#8217;t properly use the table schema from \/usr\/share. Here &hellip; <a href=\"https:\/\/haxed.me.uk\/index.php\/2018\/03\/21\/fixing-phpmyadmin-connection-controluser-defined-configuration-failed\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33,63,2],"tags":[],"class_list":["post-1122","post","type-post","status-publish","format-standard","hentry","category-apache","category-disk-tools","category-mysql"],"_links":{"self":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/1122","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/comments?post=1122"}],"version-history":[{"count":1,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/1122\/revisions"}],"predecessor-version":[{"id":1123,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/1122\/revisions\/1123"}],"wp:attachment":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/media?parent=1122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/categories?post=1122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/tags?post=1122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}