mysq[hel]l :: 2018-02-07 19:02:12

Ever have 2 entries in your MySQL mysql database table “users” both root, one with the host : wildcard “%” and one with the host : localhost? Ever been tempted to delete one in order to be more organized? Yeah! Me neither… right right, only a temptation. In theory all data “disappears”… you can only see “information_schema” database.


mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 39
Server version: 5.7.20-0ubuntu0.17.04.1 (Ubuntu)

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
| Database           |
| information_schema |
1 row in set (0.00 sec)

Just a theory. But in theory the data is still in the MySQL data directory, just hidden from the root users sight now… In theory I fixed it, and theoretically the data “reappeared”…  theoretically I had to buy some new underwear…

But I digress, the steps to theoretically fix this hypothetical situation which never compromised countless organizations and NEVER EVER happened will be posted soon!

« »