linghengqian commented on issue #18192:
URL: 
https://github.com/apache/shardingsphere/issues/18192#issuecomment-1147199391

   > The error happened when I added this line 
   > 
   > `connectionInitSqls: SET NAMES utf8mb4  #让 druid 支持特殊字符`
   
   - Use MySQL JDBC-driven properties to perform SQL for specific data sources, 
rather than through global properties of the JDBC pool, which most likely did 
not complete initialization at execution time, see 
https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-configuration-properties.html.
 
   
   - If you need to execute this SQL at startup for all of ShardingSphere's 
data sources, you should use Spring's `ApplicationRunner` or 
`CommandLineRunner` to execute the corresponding SQL event, as does 
`javax.annotation.PostConstruct`. 
   
   - A more reasonable means of verification is to execute this SQL directly 
against the configured `ShardingSphere Proxy 5.1.1`. I get the impression that 
this SQL is not supported because not all databases can be changed this way.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to