scm_prepare_database.sh CDH initial data script execute error

Environment

CDH 5
MySQL 5.7.30

check the manual that corresponds to your MySQL server version for the right synta to use near '@ default character  
set utf8 at line 1

reason

For the problem of script execution mode, – P does not write a password after it. Execute it directly, and then enter the password. The result returns successful

/usr/share/cmf/schema/scm_prepare_database.sh mysql -h Database_ip -u username -p --scm-host cdhip scm scm scm

Read More: