CDH 搭建 java.sql.SQLException: Your password has expired. 解决方法
作者:
dave
CDH 安装执行数据库初始化时报错:
[root@hadoop-cm ~]# /opt/cm-5.16.1/share/cmf/schema/scm_prepare_database.sh mysql -hlocalhost -uroot -p123456 --scm-host localhost scm scm scm
JAVA_HOME=/usr/lib/jvm/jre-openjdk
Verifying that we can write to /opt/cm-5.16.1/etc/cloudera-scm-server
log4j:ERROR Could not find value for key log4j.appender.A
log4j:ERROR Could not instantiate appender named "A".
[2019-04-30 10:35:17,325]ERROR 1[main] - com.cloudera.enterprise.dbutil.DbProvisioner.executeSql(DbProvisioner.java) - Exception when creating/dropping database with user 'root' and jdbc url 'jdbc:mysql://localhost/?useUnicode=true&characterEncoding=UTF-8'
java.sql.SQLException: Your password has expired. To log in you must change it using a client that supports expired passwords.
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3978)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3914)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:871)
解决方法:
mysql> update mysql.user set password_expired='N';
Query OK, 3 rows affected (0.00 sec)
Rows matched: 13 Changed: 3 Warnings: 0
mysql> select host,user,password_expired from mysql.user;
+-----------+--------+------------------+
| host | user | password_expired |
+-----------+--------+------------------+
| % | root | N |
| hadoop-cm | root | N |
| 127.0.0.1 | root | N |
| ::1 | root | N |
| % | scm | N |
| % | amon | N |
| % | rman | N |
| % | hue | N |
| % | hive | N |
| % | sentry | N |
| % | nav | N |
| % | navms | N |
| % | oozie | N |
+-----------+--------+------------------+
13 rows in set (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
然后在执行,恢复正常。
版权声明:本文为博主原创文章,未经博主允许不得转载。