I have installed MySQL 5.7.9 on RHEL 6.5. After installation, when I tried to enter using system root password it is not able to login. I know I have to assign the password for MySQL root user but how can I assign the password when MySQL is not even letting me enter?
When I run the command:
#mysql -u root
It just kicks me out with this error:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
I know after MySQL installation it generates the temporary password in /var/log/mysqld.log. But after looking into this file I found nothing except these errors:
0 [ERROR] Incorrect definition of table mysql.db: expected column 'User' at position 2 to have type char(32), found type char(16). 0 [ERROR] mysql.user has no `Event_priv` column at position 28 0 [ERROR] Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler. 0 [Note] /usr/sbin/mysqld: ready for connections. Version: '5.7.11' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL) 2 [Note] Access denied for user 'UNKNOWN_MYSQL_USER'@'localhost' (using password: NO) 3 [Note] Access denied for user 'root'@'localhost' (using password: YES) 4 [Note] Access denied for user 'root'@'localhost' (using password: NO) 5 [Note] Access denied for user 'root'@'localhost' (using password: YES)