Closed zzsoszz closed 1 year ago
Hi @zzsoszz
host
is a string, it needs to be wrapped in quotes.
host="119.23.110.179"
Please refer to the document of DistSQL: https://shardingsphere.apache.org/document/5.2.1/en/user-manual/shardingsphere-proxy/distsql/syntax/rdl/resource-definition/
@zzsoszz I think the issue has been solved, I will close it.
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 client version
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