Some painful insights on MySQL
1. mysql> create database aa;
ERROR 1044 (42000): Access denied for user ''@ 'localhost' to database 'aa'
This is what Anonymous Users mean ~~~ Although you think you are a root user
Solution: Change the real root login
F:\Softwares\mysql5\mysql-5.6.24-winx64\bin>mysql --user=root -pEnter password:Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 12Server version: 5.6.24 MySQL Community Server (GPL)Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> create database dbb;Query OK, 1 row affected (0.00 sec)
Note that mysql -- user = root-p enables you to log on as root, so the password shown below is the root password, which is blank by default and enter directly.
F:\Softwares\mysql5\mysql-5.6.24-winx64\bin>mysql --user=root -pEnter password: ******ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
This indicates that the password is incorrect.