You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/10/29 01:12:03 UTC

[GitHub] [shardingsphere] duzhanfei opened a new issue #7950: 【sharding-proxy 】how to Set the character set

duzhanfei opened a new issue #7950:
URL: https://github.com/apache/shardingsphere/issues/7950


   **Now I connect sharding-Proxy via Navicat. When inserting data, the Chinese code will be displayed, and when adding tables, the Chinese annotation will also be displayed. How to set this**
   
   Log information is as follows:
   
   [INFO ] 08:58:17.476 [ShardingSphere-Command-10] ShardingSphere-SQL - Actual SQL: ds_1 ::: show tables
   [INFO ] 08:58:17.477 [ShardingSphere-Command-10] ShardingSphere-SQL - Actual SQL: ds_2 ::: show tables
   line 1:6 no viable alternative at input 'ALTERDATABASE'
   line 1:6 no viable alternative at input 'ALTERDATABASE'
   [ERROR] 09:07:26.389 [ShardingSphere-Command-11] o.a.s.s.f.c.CommandExecutorTask - Exception occur:
   org.apache.shardingsphere.sql.parser.exception.SQLParsingException: Unsupported SQL of `ALTER DATABASE `sharding_db` CHARACTER SET utf8 COLLATE utf8_genera;`
           at org.apache.shardingsphere.sql.parser.core.parser.SQLParserExecutor.execute(SQLParserExecutor.java:49)
           at org.apache.shardingsphere.sql.parser.SQLParserEngine.parse0(SQLParserEngine.java:79)
           at org.apache.shardingsphere.sql.parser.SQLParserEngine.parse(SQLParserEngine.java:61)
           at org.apache.shardingsphere.shardingproxy.backend.text.TextProtocolBackendHandlerFactory.newInstance(TextProtocolBackendHandlerFactory.java:69)
           at org.apache.shardingsphere.shardingproxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.<init>(MySQLComQueryPacketExecutor.java:70)
           at org.apache.shardingsphere.shardingproxy.frontend.mysql.command.MySQLCommandExecutorFactory.newInstance(MySQLCommandExecutorFactory.java:70)
           at org.apache.shardingsphere.shardingproxy.frontend.mysql.command.MySQLCommandExecuteEngine.getCommandExecutor(MySQLCommandExecuteEngine.java:59)
           at org.apache.shardingsphere.shardingproxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:92)
           at org.apache.shardingsphere.shardingproxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:71)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
           at java.lang.Thread.run(Unknown Source)


----------------------------------------------------------------
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.

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



[GitHub] [shardingsphere] tuohai666 commented on issue #7950: 【sharding-proxy 】how to Set the character set

Posted by GitBox <gi...@apache.org>.
tuohai666 commented on issue #7950:
URL: https://github.com/apache/shardingsphere/issues/7950#issuecomment-719196330


   @duzhanfei 


----------------------------------------------------------------
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.

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



[GitHub] [shardingsphere] duzhanfei commented on issue #7950: 【sharding-proxy 】how to Set the character set

Posted by GitBox <gi...@apache.org>.
duzhanfei commented on issue #7950:
URL: https://github.com/apache/shardingsphere/issues/7950#issuecomment-718389819


   Caused by the database version
   
    this problem appears in    when    mysql  version at 5.7.11  
   
   <img width="572" alt="图片14" src="https://user-images.githubusercontent.com/46663706/97532705-e08bc080-19f1-11eb-9448-b8e383596098.png">
   <img width="559" alt="图片15" src="https://user-images.githubusercontent.com/46663706/97532942-54c66400-19f2-11eb-8a1e-7b9ed2c23474.png">
   <img width="662" alt="图片16" src="https://user-images.githubusercontent.com/46663706/97532990-67d93400-19f2-11eb-9455-bfc6ecfef6ec.png">
   
   mysql  version at 5.7.25.log  is ok 
   
   <img width="740" alt="图片17" src="https://user-images.githubusercontent.com/46663706/97533195-bd154580-19f2-11eb-8749-44762906369c.png">
   <img width="568" alt="图片18" src="https://user-images.githubusercontent.com/46663706/97533207-c2729000-19f2-11eb-97ed-ecc7e200134e.png">
   
   
   
   


----------------------------------------------------------------
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.

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



[GitHub] [shardingsphere] kimmking commented on issue #7950: 【sharding-proxy 】how to Set the character set

Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #7950:
URL: https://github.com/apache/shardingsphere/issues/7950#issuecomment-718401443


   @tuohai666 


----------------------------------------------------------------
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.

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



[GitHub] [shardingsphere] tuohai666 commented on issue #7950: 【sharding-proxy 】how to Set the character set

Posted by GitBox <gi...@apache.org>.
tuohai666 commented on issue #7950:
URL: https://github.com/apache/shardingsphere/issues/7950#issuecomment-719148792


   @duzhanfei what is the version of connector-java you put into shardingsphere-proxy?


----------------------------------------------------------------
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.

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



[GitHub] [shardingsphere] terrymanu closed issue #7950: 【sharding-proxy 】how to Set the character set

Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #7950:
URL: https://github.com/apache/shardingsphere/issues/7950


   


----------------------------------------------------------------
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.

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



[GitHub] [shardingsphere] duzhanfei commented on issue #7950: 【sharding-proxy 】how to Set the character set

Posted by GitBox <gi...@apache.org>.
duzhanfei commented on issue #7950:
URL: https://github.com/apache/shardingsphere/issues/7950#issuecomment-719150601


   <dependency>
   <groupId>mysql</groupId>
   <artifactId>mysql-connector-java</artifactId>
   <version>8.0.13</version>
   </dependency>
   
   
   
   At 2020-10-30 11:26:30, "Zhang Yonglun" <no...@github.com> wrote:
   
   @duzhanfei what is the version of connector-java you put into shardingsphere-proxy?
   
   —
   You are receiving this because you were mentioned.
   Reply to this email directly, view it on GitHub, or unsubscribe.


----------------------------------------------------------------
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.

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



[GitHub] [shardingsphere] duzhanfei commented on issue #7950: 【sharding-proxy 】how to Set the character set

Posted by GitBox <gi...@apache.org>.
duzhanfei commented on issue #7950:
URL: https://github.com/apache/shardingsphere/issues/7950#issuecomment-718297983


   I has tried all shardingproxy versions,the result is same:


----------------------------------------------------------------
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.

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



[GitHub] [shardingsphere] duzhanfei commented on issue #7950: 【sharding-proxy 】how to Set the character set

Posted by GitBox <gi...@apache.org>.
duzhanfei commented on issue #7950:
URL: https://github.com/apache/shardingsphere/issues/7950#issuecomment-718333158


   Examples of scrambled code are shown below
   
   <img width="894" alt="图片12" src="https://user-images.githubusercontent.com/46663706/97521325-4bc89900-19d8-11eb-9edf-791d74339831.png">
   


----------------------------------------------------------------
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.

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



[GitHub] [shardingsphere] duzhanfei commented on issue #7950: 【sharding-proxy 】how to Set the character set

Posted by GitBox <gi...@apache.org>.
duzhanfei commented on issue #7950:
URL: https://github.com/apache/shardingsphere/issues/7950#issuecomment-719152566






----------------------------------------------------------------
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.

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



[GitHub] [shardingsphere] duzhanfei commented on issue #7950: 【sharding-proxy 】how to Set the character set

Posted by GitBox <gi...@apache.org>.
duzhanfei commented on issue #7950:
URL: https://github.com/apache/shardingsphere/issues/7950#issuecomment-718333913


   Examples of scrambled code are shown below
   
   
   <img width="657" alt="图片13" src="https://user-images.githubusercontent.com/46663706/97521514-a8c44f00-19d8-11eb-8cbe-0bccd8362ae3.png">
   


----------------------------------------------------------------
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.

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



[GitHub] [shardingsphere] tuohai666 commented on issue #7950: 【sharding-proxy 】how to Set the character set

Posted by GitBox <gi...@apache.org>.
tuohai666 commented on issue #7950:
URL: https://github.com/apache/shardingsphere/issues/7950#issuecomment-719167663


   Add **useUnicode=true&characterEncoding=UTF-8** to the **jdbcUrl** in **config-sharding.yaml** and have a try.


----------------------------------------------------------------
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.

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



[GitHub] [shardingsphere] duzhanfei removed a comment on issue #7950: 【sharding-proxy 】how to Set the character set

Posted by GitBox <gi...@apache.org>.
duzhanfei removed a comment on issue #7950:
URL: https://github.com/apache/shardingsphere/issues/7950#issuecomment-719150601


   <dependency>
   <groupId>mysql</groupId>
   <artifactId>mysql-connector-java</artifactId>
   <version>8.0.13</version>
   </dependency>
   
   
   
   At 2020-10-30 11:26:30, "Zhang Yonglun" <no...@github.com> wrote:
   
   @duzhanfei what is the version of connector-java you put into shardingsphere-proxy?
   
   —
   You are receiving this because you were mentioned.
   Reply to this email directly, view it on GitHub, or unsubscribe.


----------------------------------------------------------------
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.

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



[GitHub] [shardingsphere] duzhanfei removed a comment on issue #7950: 【sharding-proxy 】how to Set the character set

Posted by GitBox <gi...@apache.org>.
duzhanfei removed a comment on issue #7950:
URL: https://github.com/apache/shardingsphere/issues/7950#issuecomment-718333158


   Examples of scrambled code are shown below
   
   <img width="894" alt="图片12" src="https://user-images.githubusercontent.com/46663706/97521325-4bc89900-19d8-11eb-9edf-791d74339831.png">
   


----------------------------------------------------------------
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.

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