I just realized I have some blank users which I deleted but I can still login to this dummy account without a password for some reason.
mysql -u -p
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.1.69 Source distribution
Copyright (c) 2000, 2013, 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
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> select user()
-> ;
+--------------+
| user() |
+--------------+
| -p@localhost |
+--------------+
1 row in set (0.00 sec)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| test |
+--------------------+
2 rows in set (0.00 sec)
mysql> select User from user;
+-----------------+
| User |
+-----------------+
| root |
| |
| root |
| |
| root |
+-----------------+
6 rows in set (0.00 sec)
mysql> delete from mysql where User='';
ERROR 1146 (42S02): Table 'mysql.mysql' doesn't exist
mysql> delete from user where User='';
Query OK, 2 rows affected (0.00 sec)
mysql> select User from user;
+-----------------+
| User |
+-----------------+
| root |
| root |
| root |
+-----------------+
4 rows in set (0.00 sec)