{"id":2326,"date":"2019-02-27T18:02:39","date_gmt":"2019-02-27T18:02:39","guid":{"rendered":"http:\/\/www.incredigeek.com\/home\/?p=2326"},"modified":"2019-02-27T18:03:35","modified_gmt":"2019-02-27T18:03:35","slug":"delete-anonymous-mysql-user","status":"publish","type":"post","link":"https:\/\/www.incredigeek.com\/home\/delete-anonymous-mysql-user\/","title":{"rendered":"Delete anonymous MySQL user"},"content":{"rendered":"\n<p><strong>Log into mysql<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql -u root -p<\/pre>\n\n\n\n<p><strong>List users<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">select User,Host from mysql.user;<\/pre>\n\n\n\n<p>Should return something like the following<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">MariaDB [mysql]> select User,Host from user;<br> +----------+-----------------------+<br> | User     | Host                  |<br> +----------+-----------------------+<br> | root     | 127.0.0.1             |<br> | librenms | localhost             |<br> |          | localhost.localdomain |<br> +----------+-----------------------+<br> 3 rows in set (0.00 sec)<br>MariaDB [mysql]><\/pre>\n\n\n\n<p><strong>Delete anonymous user<\/strong> <\/p>\n\n\n\n<p>Note that there are two single quotes &#8216; before the @ sign, not a double quote &#8220;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">drop user ''@'localhost.localdomain';<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Log into mysql mysql -u root -p List users select User,Host from mysql.user; Should return something like the following MariaDB [mysql]> select User,Host from user; +&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+ | User | Host | +&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+ | root | 127.0.0.1 | | librenms | &hellip; <a href=\"https:\/\/www.incredigeek.com\/home\/delete-anonymous-mysql-user\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[135],"tags":[7,282,136,549],"class_list":["post-2326","post","type-post","status-publish","format-standard","hentry","category-mysql","tag-linux-2","tag-mariadb","tag-mysql-2","tag-users"],"_links":{"self":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/2326","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/comments?post=2326"}],"version-history":[{"count":4,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/2326\/revisions"}],"predecessor-version":[{"id":2331,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/2326\/revisions\/2331"}],"wp:attachment":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/media?parent=2326"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/categories?post=2326"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/tags?post=2326"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}