This is an automated email from the ASF dual-hosted git repository. dockerzhang pushed a commit to branch release-1.3.0 in repository https://gitbox.apache.org/repos/asf/inlong.git
commit c999a90da85c953baa863cb2b06f7a9481a1d223 Author: Charles Zhang <dockerzh...@apache.org> AuthorDate: Wed Sep 14 19:33:30 2022 +0800 [INLONG-5890][Script] Add tcp protocol when connecting to MySQL (#5891) --- bin/inlong-daemon | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/inlong-daemon b/bin/inlong-daemon index 646a42b70..b70bfef26 100644 --- a/bin/inlong-daemon +++ b/bin/inlong-daemon @@ -68,10 +68,10 @@ start_inlong_audit() { echo "init apache_inlong_audit" cd $INLONG_HOME/inlong-audit select_db_sql="SELECT COUNT(*) FROM information_schema.TABLES WHERE table_schema = 'apache_inlong_audit'" - inlong_audit_count=$(mysql -h${spring_datasource_hostname} -P${spring_datasource_port} -u${spring_datasource_username} -p${spring_datasource_password} -e "${select_db_sql}") + inlong_audit_count=$(mysql --protocol=tcp -h${spring_datasource_hostname} -P${spring_datasource_port} -u${spring_datasource_username} -p${spring_datasource_password} -e "${select_db_sql}") inlong_num=$(echo $inlong_audit_count | tr -cd "[0-9]") if [ $inlong_num -eq 0 ]; then - mysql -h${spring_datasource_hostname} -P${spring_datasource_port} -u${spring_datasource_username} -p${spring_datasource_password} <sql/apache_inlong_audit.sql + mysql --protocol=tcp -h${spring_datasource_hostname} -P${spring_datasource_port} -u${spring_datasource_username} -p${spring_datasource_password} <sql/apache_inlong_audit.sql fi echo "start audit proxy" if [ "${mq_type}" = "pulsar" ]; then @@ -92,11 +92,11 @@ start_inlong_manager() { cd $INLONG_HOME/inlong-manager # Whether the database table exists. If it does not exist, initialize the database and skip if it exists. select_db_sql="SELECT COUNT(*) FROM information_schema.TABLES WHERE table_schema = 'apache_inlong_manager'" - inlong_manager_count=$(mysql -h${spring_datasource_hostname} -P${spring_datasource_port} -u${spring_datasource_username} -p${spring_datasource_password} -e "${select_db_sql}") + inlong_manager_count=$(mysql --protocol=tcp -h${spring_datasource_hostname} -P${spring_datasource_port} -u${spring_datasource_username} -p${spring_datasource_password} -e "${select_db_sql}") inlong_num=$(echo $inlong_manager_count | tr -cd "[0-9]") if [ $inlong_num -eq 0 ]; then echo "init apache_inlong_manager database" - mysql -h${spring_datasource_hostname} -P${spring_datasource_port} -u${spring_datasource_username} -p${spring_datasource_password} <sql/apache_inlong_manager.sql + mysql --protocol=tcp -h${spring_datasource_hostname} -P${spring_datasource_port} -u${spring_datasource_username} -p${spring_datasource_password} <sql/apache_inlong_manager.sql fi bash +x ./bin/startup.sh # wait to start