You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "zheng594 (via GitHub)" <gi...@apache.org> on 2025/04/08 12:05:43 UTC

[I] [Bug] [Mysql source] sql有中文乱码 [seatunnel]

zheng594 opened a new issue, #9127:
URL: https://github.com/apache/seatunnel/issues/9127

   ### Search before asking
   
   - [x] I had searched in the [issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22) and found no similar issues.
   
   
   ### What happened
   
   seatunnel为2.3.8版本,mysql作为source,sql中涉及到中文会乱码,jdbc设置了useUnicode=true&characterEncoding=utf8也没效果。
   
   ![Image](https://github.com/user-attachments/assets/ef5d015b-1822-43cb-b8f0-1c45bffc0f1b)
   
   ### SeaTunnel Version
   
   2.3.8
   
   ### SeaTunnel Config
   
   ```conf
   无
   ```
   
   ### Running Command
   
   ```shell
   无
   ```
   
   ### Error Exception
   
   ```log
   无
   ```
   
   ### Zeta or Flink or Spark Version
   
   _No response_
   
   ### Java or Scala Version
   
   _No response_
   
   ### Screenshots
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [Mysql source] There is Chinese character garbling in SQL [seatunnel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #9127:
URL: https://github.com/apache/seatunnel/issues/9127#issuecomment-2974806773

   This issue has been closed because it has not received response for too long time. You could reopen it if you encountered similar problems in the future.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [Mysql source] sql有中文乱码 [seatunnel]

Posted by "Tangruilin (via GitHub)" <gi...@apache.org>.
Tangruilin commented on issue #9127:
URL: https://github.com/apache/seatunnel/issues/9127#issuecomment-2818749013

   这个问题现在还存在吗?如果存在我本地尝试复现一下


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [Mysql source] There is Chinese character garbling in SQL [seatunnel]

Posted by "Tsukasa007 (via GitHub)" <gi...@apache.org>.
Tsukasa007 commented on issue #9127:
URL: https://github.com/apache/seatunnel/issues/9127#issuecomment-3100516333

   Hello, I'm also encountering this issue. Here is my job configuration. Could you take a look? The fields in the automatically created tables are garbled.
   
   env {
     parallelism = 1
     job.mode = "STREAMING"
     checkpoint.interval = 10000
   }
   
   source {
     MySQL-CDC {
       base-url = "jdbc:mysql://172.16.21.169:3307/czhl_new_column?characterEncoding=UTF-8"
       username = "root"
       password = "123"
       database-names = ["czhl_new_column"]
       table-names = ["czhl_new_column.def_user"]
       startup.mode = "initial"
       plugin_output = "source1"
     }
   
     
   }
   
   transform {
     Sql {
       query = "SELECT id as `user_id`, username as `user_username拉阿拉`, nick_name as `user_nick_name`, mobile as `user_mobile` FROM dual"
       plugin_input = "source1"
       plugin_output = "transform1"
     }
   }
   
   sink {
     jdbc {
       plugin_input = "transform1"
       url = "jdbc:mysql://172.16.21.169:3307/seatunnel_sync_test?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true"
       driver = "com.mysql.cj.jdbc.Driver"
       user = "root"
       password = "123"
       
       generate_sink_sql = true
       database = "seatunnel_sync_test"
       table = "user_employee"
       primary_keys = ["user_id"]
       schema_save_mode = "CREATE_SCHEMA_WHEN_NOT_EXIST"
       data_save_mode = "APPEND_DATA"
     }
   }
   
   
   <img width="845" height="236" alt="Image" src="https://github.com/user-attachments/assets/94f06df8-4645-4a6c-a031-cda0249951ea" />


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [Mysql source] There is Chinese character garbling in SQL [seatunnel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #9127: [Bug] [Mysql source] There is Chinese character garbling in SQL
URL: https://github.com/apache/seatunnel/issues/9127


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [Mysql source] There is Chinese character garbling in SQL [seatunnel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #9127:
URL: https://github.com/apache/seatunnel/issues/9127#issuecomment-2953303376

   This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org