Member since
07-11-2018
2
Posts
3
Kudos Received
1
Solution
My Accepted Solutions
Title | Views | Posted |
---|---|---|
15897 | 07-12-2018 04:17 PM |
07-12-2018
04:17 PM
2 Kudos
Many thanks for the suggestions from Eric and Sai, I think there may be something wrong with my mysql root access as Eric's suggestion not working for me either: [root@sandbox-hdp ~]# mysql -uroot -phadoop -hlocalhost mysql: [Warning] Using a password on the command line interface can be insecure. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) I ended up reset the password using the following approach systemctl stop mysqld systemctl set-environment MYSQLD_OPTS="--skip-grant-tables --skip-networking" systemctl start mysqld mysql -uroot Once in the mysql, run: FLUSH PRVILEGES; UPDATE PASSWORD FOR root@'localhost'=PASSWORD('hadoop') FLUSH PRIVILEGES; QUIT; Once log out from mysql, clear the environment MYSQLD_OPTS and restart mysql server systemctl unset-environment MYSQLD_OPTS systemctl restart mysqld mysql -uroot -phadoop
... View more
07-11-2018
05:42 PM
1 Kudo
Hi I am a newbie to HDP, I downloaded the HDP and run with virtualbox. However, when i tried to access the mysql database for the first time after ssh into the sandbox VM, I encountered the following error: [root@sandbox-hdp ~]# mysql -uroot ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) Originally I thought that maybe mysql does require any password for the first time login, therefore i tried to use "hadoop" as the password as suggested in some of the posts i googled, but again the access was denied: [root@sandbox-hdp ~]# mysql -uroot -phadoop mysql: [Warning] Using a password on the command line interface can be insecure. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) I have also followed this post https://community.hortonworks.com/questions/86949/error-1045-28000-access-denied-for-user-root.html but the suggested solution was not working for me:
# mysql -u root -p Enter password: hadoop ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) I even tries other means such as [root@sandbox-hdp ~]# mysql -root -h 0.0.0.0 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) I am using the latest HDP sandbox which is version 2.6.5 [root@sandbox-hdp ~]# sandbox-version == Sandbox Information == Platform: hdp-security Build date: 06-18-2018 Ambari version: 2.6.2.0-155 Hadoop version: Hadoop 2.7.3.2.6.5.0-292 OS: CentOS Linux release 7.5.1804 Any help will be appreciated
... View more
Labels: