zzsoszz opened a new issue, #22153:
URL: https://github.com/apache/shardingsphere/issues/22153

   ## Bug Report
   mysql> ADD RESOURCE ds01 (
       -> host=127.0.0.1,
       -> port=13306,
       -> db="my_database",
       -> user="root",
       -> password="my_root_password"
       -> )
       -> ;
   ERROR 12000 (42000): You have an error in your SQL syntax: ADD RESOURCE ds01 
(
   host=127.0.0.1,
   port=13306,
   db="my_database",
   user="root",
   password="my_root_password"
   ), no viable alternative at input 'ADD' at line 1, position 0, near 
[@0,0:2='ADD',<78>,1:0]
   
   ### Which version of ShardingSphere did you use?
   ```
   mysql> select version();
   +-----------------------------------+
   | version()                         |
   +-----------------------------------+
   | 5.7.22-ShardingSphere-Proxy 5.2.1 |
   +-----------------------------------+
   1 row in set (0.04 sec)
   ```
   
   
   ### mysql client version
   ```mysql --version
   mysql  Ver 8.0.31-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))
   ```
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy
   
   ### Expected behavior
   add resource sucessed;
   ### Actual behavior
   no viable alternative at input 'ADD' at line 1, position 0, near 
[@0,0:2='ADD',<78>,1:0]
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
   
   ```server.yaml
   
   authority:
     users:
       - user: root
         password: root
       - user: sharding
         password: sharding
     privilege:
       type: ALL_PERMITTED
   
   rules:
     - !TRANSACTION
       defaultType: XA
       providerType: Atomikos
     - !SQL_PARSER
       sqlCommentParseEnabled: true
   
   props:
     max-connections-size-per-query: 1
     kernel-executor-size: 16  # Infinite by default.
     proxy-frontend-flush-threshold: 128  # The default value is 128.
     proxy-hint-enabled: true
     sql-show: false
     check-table-metadata-enabled: false
       # Proxy backend query fetch size. A larger value may increase the memory 
usage of ShardingSphere Proxy.
     # The default value is -1, which means set the minimum value for different 
JDBC drivers.
     proxy-backend-query-fetch-size: -1
     proxy-frontend-executor-size: 0 # Proxy frontend executor size. The 
default value is 0, which means let Netty decide.
       # Available options of proxy backend executor suitable: OLAP(default), 
OLTP. The OLTP option may reduce time cost of writing packets to client, but it 
may increase the latency of SQL execution
     # if client connections are more than proxy-frontend-netty-executor-size, 
especially executing slow SQL.
     proxy-backend-executor-suitable: OLAP
   ```
   
   ``` start proxy
   shardingsphere-proxy/bin/start.sh
   
   ```
   
   ``` connect to server
   mysql -h127.0.0.1 -P3307 -uroot -proot
   ```
   
   ```
   ADD RESOURCE ds01 (
        host=119.23.110.179,
        port=13306,
        db="my_database",
        user="root",
        password="my_root_password"
   );
   
   ```


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