Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

Change mysql version from 5 to 8, scm_prepare_database.sh has some problems

avatar
Frequent Visitor

[root@master cloudera-scm-server]# /opt/cloudera/cm/schema/scm_prepare_database.sh -h172.16.4.131 -P3306 -uroot -pZyht_1234 mysql scm scm Zyht_1234ca
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.332.b09-1.el7_9.x86_64
Verifying that we can write to /etc/cloudera-scm-server
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.
[ main] DbProvisioner ERROR Exception when creating/dropping database with user 'root' and jdbc url 'jdbc:mysql://172.16.4.131:3306/?useUnicode=true&characterEncoding=UTF-8'
java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'identified by 'Zyht_1234ca'' at line 1
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)[mysql-connector-java.jar:8.0.30]
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)[mysql-connector-java.jar:8.0.30]
at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:763)[mysql-connector-java.jar:8.0.30]
at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:648)[mysql-connector-java.jar:8.0.30]
at com.cloudera.enterprise.dbutil.DbProvisioner.executeSql(DbProvisioner.java:299)[db-common-6.3.1.96818eaab0a222aa84a7854b8d22c0c7.jar:]
at com.cloudera.enterprise.dbutil.DbProvisioner.doMain(DbProvisioner.java:104)[db-common-6.3.1.96818eaab0a222aa84a7854b8d22c0c7.jar:]
at com.cloudera.enterprise.dbutil.DbProvisioner.main(DbProvisioner.java:123)[db-common-6.3.1.96818eaab0a222aa84a7854b8d22c0c7.jar:]
[ main] DbProvisioner ERROR Stack Trace:
java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'identified by 'Zyht_1234ca'' at line 1
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)[mysql-connector-java.jar:8.0.30]
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)[mysql-connector-java.jar:8.0.30]
at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:763)[mysql-connector-java.jar:8.0.30]
at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:648)[mysql-connector-java.jar:8.0.30]
at com.cloudera.enterprise.dbutil.DbProvisioner.executeSql(DbProvisioner.java:299)[db-common-6.3.1.96818eaab0a222aa84a7854b8d22c0c7.jar:]
at com.cloudera.enterprise.dbutil.DbProvisioner.doMain(DbProvisioner.java:104)[db-common-6.3.1.96818eaab0a222aa84a7854b8d22c0c7.jar:]
at com.cloudera.enterprise.dbutil.DbProvisioner.main(DbProvisioner.java:123)[db-common-6.3.1.96818eaab0a222aa84a7854b8d22c0c7.jar:]
--> Error 1, giving up (use --force if you wish to ignore the error)

1 ACCEPTED SOLUTION

avatar
Super Guru

@lie ,

 

MySQL 8 is not a supported version for CM/CDH 6.3.1, which is the version you're using, as you can see here: https://docs.cloudera.com/documentation/enterprise/6/release-notes/topics/rg_database_requirements.h...

 

You should pick a version that is compatible with your CDH version. Alternatively, you can upgrade to CDP.

 

Cheers,

André

--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.

View solution in original post

1 REPLY 1

avatar
Super Guru

@lie ,

 

MySQL 8 is not a supported version for CM/CDH 6.3.1, which is the version you're using, as you can see here: https://docs.cloudera.com/documentation/enterprise/6/release-notes/topics/rg_database_requirements.h...

 

You should pick a version that is compatible with your CDH version. Alternatively, you can upgrade to CDP.

 

Cheers,

André

--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.