分享

初始化CM遇到N多问题,请大仙指导

//初始化CM,执行下面脚本
/opt/cm-5.13.3/share/cmf/schema/scm_prepare_database.sh mysql -hlocalhost -uroot -proot --scm-host localhost scm scm scmpassword
错误1:
Your password does not satisfy the current policy requirements

mysql 的 validate_password_policy  已经设置为 LOW ,已经重启服务,求解。谢谢


已有(6)人评论

跳转到指定楼层
s060403072 发表于 2018-8-6 19:17:59

validate_password插件是mysql5.6以后可以引入的一个新密码校验插件,判断修改密码时候新密码是否符合当前的策略,不满足报错,不让修改。



更多内容如下:
validate_password_policy作用

判断修改密码时候新密码是否符合当前的策略,不满足报错,不让修改。

validate_password_policy类型[td]
Policy
Tests Performed
0 or LOWLength
1 or MEDIUMLength; numeric, lowercase/uppercase, and special characters
2 or STRONGLength; numeric, lowercase/uppercase, and special characters; dictionary file

用于控制validate_password行为系统参数:

  这些参数是要安装好validate_password 插件后才能通过show variables like 'validate_password%';看到。

  001、validate_password_policy 这个参数用于控制validate_password的验证策略 0-->low  1-->MEDIUM  2-->strong。

  002、validate_password_length密码长度的最小值(这个值最小要是4)。

  003、validate_password_number_count 密码中数字的最小个数。

  004、validate_password_mixed_case_count大小写的最小个数。

  005、validate_password_special_char_count 特殊字符的最小个数。

  006、validate_password_dictionary_file 字典文件

查看所有的validate_password相关的参数值


回复

使用道具 举报

yuanyaowen 发表于 2018-8-7 08:49:48
mysql> SHOW VARIABLES LIKE 'validate_password%';
+--------------------------------------+--------+
| Variable_name                        | Value  |
+--------------------------------------+--------+
| validate_password_check_user_name    | OFF    |
| validate_password_dictionary_file    |        |
| validate_password_length             | 8      |
| validate_password_mixed_case_count   | 1      |
| validate_password_number_count       | 1      |
| validate_password_policy             | MEDIUM |
| validate_password_special_char_count | 1      |

设置的口令是 Scm1@#scm,应该符合要求了。
回复

使用道具 举报

yuanyaowen 发表于 2018-8-7 10:53:30
再次运行同样的语句,报错
018-08-07 10:52:27,219 [main] ERROR com.cloudera.enterprise.dbutil.DbProvisioner  - Stack Trace:
java.sql.SQLException: Can't create database 'cm'; database exists
回复

使用道具 举报

sstutu 发表于 2018-8-7 12:38:53
yuanyaowen 发表于 2018-8-7 10:53
再次运行同样的语句,报错
018-08-07 10:52:27,219 [main] ERROR com.cloudera.enterprise.dbutil.DbProvi ...

数据库已经存在了cm
回复

使用道具 举报

yuanyaowen 发表于 2018-8-7 15:36:49
本帖最后由 yuanyaowen 于 2018-8-7 16:26 编辑

root@sechdp01 opt]# /opt/cm-5.13.3/share/cmf/schema/scm_prepare_database.sh mysql -h localhost uroot -psecHDP@123 --scm-host localhost scm scm Scm1@scm
JAVA_HOME=/usr/java/jdk1.8.0_181-amd64
Verifying that we can write to /opt/cm-5.13.3/etc/cloudera-scm-server
Creating SCM configuration file in /opt/cm-5.13.3/etc/cloudera-scm-server
Executing:  /usr/java/jdk1.8.0_181-amd64/bin/java -cp /usr/share/java/mysql-connector-java.jar:/usr/share/java/oracle-connector-java.jar:/opt/cm-5.13.3/share/cmf/schema/../lib/* com.cloudera.enterprise.dbutil.DbCommandExecutor /opt/cm-5.13.3/etc/cloudera-scm-server/db.properties com.cloudera.cmf.db.
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
Tue Aug 07 16:20:25 CST 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
2018-08-07 16:20:25,396 [main] INFO  com.cloudera.enterprise.dbutil.DbCommandExecutor  - Unable to login using supplied username/password.
2018-08-07 16:20:25,398 [main] ERROR com.cloudera.enterprise.dbutil.DbCommandExecutor  - Error when connecting to database.
java.sql.SQLException: Access denied for user 'scm'@'localhost' (using password: YES)
        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:127)
        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:95)
        at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
        at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:862)
        at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:444)
        at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:230)
        at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:226)
        at java.sql.DriverManager.getConnection(DriverManager.java:664)
        at java.sql.DriverManager.getConnection(DriverManager.java:247)
        at com.cloudera.enterprise.dbutil.DbCommandExecutor.testDbConnection(DbCommandExecutor.java:253)
        at com.cloudera.enterprise.dbutil.DbCommandExecutor.main(DbCommandExecutor.java:138)
2018-08-07 16:20:25,401 [main] ERROR com.cloudera.enterprise.dbutil.DbCommandExecutor  - Exiting with exit code 8
--> Error 8, giving up (use --force if you wish to ignore the error)
回复

使用道具 举报

huangrong 发表于 2019-5-1 23:23:58
同求解答啊
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条