issue: Access denied for ERROR 1045 (28000)
[root@jt30dmz001tc001 ~]# mysql -u root -ppass Access denied for ERROR 1045 (28000):user 'root'@'localhost' (using password: YES)#way 1#step 1: Start the MySQL server instance or daemon with the --skip-grant-tables option (security setting).mysqld --skip-grant-tables#step 2: $ mysql -u root mysql$mysql> UPDATE user SET Password=PASSWORD('my_password') where USER='root';$mysql> FLUSH PRIVILEGES;#step 3:$ /etc/init.d/mysql restart####way 2[root@jt30dmz001tc001 ~]# mysql -u root -ppass -h 0.0.0.100Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 5Server version: 5.5.38 MySQL Community Server (GPL)Copyright (c) 2000, 2014, 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>mysql> select host, user, password from user;+------------------------------+------+-------------------------------------------+| host | user | password |+------------------------------+------+-------------------------------------------+| % | root | *196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7 || jt30dmz001tc001.qa.webex.com | root | || 127.0.0.1 | root | || ::1 | root | || localhost | root | || jt30dmz001tc001.qa.webex.com | | |+------------------------------+------+-------------------------------------------+6 rows in set (0.00 sec)mysql> update user set password = PASSWORD('pass') where user = 'root' and host = 'localhost';Query OK, 1 row affected (0.00 sec)Rows matched: 1 Changed: 1 Warnings: 0mysql> select host, user, password from user;+------------------------------+------+-------------------------------------------+| host | user | password |+------------------------------+------+-------------------------------------------+| % | root | *196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7 || jt30dmz001tc001.qa.webex.com | root | || 127.0.0.1 | root | || ::1 | root | || localhost | root | *196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7 || jt30dmz001tc001.qa.webex.com | | |+------------------------------+------+-------------------------------------------+6 rows in set (0.00 sec)mysql> commit;Query OK, 0 rows affected (0.00 sec)mysql> flush privileges;Query OK, 0 rows affected (0.00 sec)[root@jt30dmz001tc001 ~]# mysql -u root -ppassWelcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 15Server version: 5.5.38 MySQL Community Server (GPL)Copyright (c) 2000, 2014, 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>