Home > Back-end >  Mycat date single library table configuration starts inserting data, not to carry on the table
Mycat date single library table configuration starts inserting data, not to carry on the table

Time:01-27

Mycat: 1.6.7
Mysql: 5.1.37
Configuration starts successfully, insert data, there is no table, what problem?
Configure the following
1, the XML schema.
 
<? The XML version="1.0"?>
CheckSQLschema: whether MyCat special semantics of SQL statements, such as if the database method was adopted to realize the ID, the value of the ID field in the SQL statements need to value the for next MYCATSEQ_TEST, if checkSQLschema to false will not test, according to field string processing, opening will detect ID generated for MyCat semantics,
-->
PrimaryKey: true primary keys
AutoIncrement: whether open primary key on the
The dataNode: specify the data node (binding real database)
SubTables: specify all true table, t_user_0 $0-2 for abbreviation, will eventually be parsed into t_user_00, t_user_01, t_user_02
Role: specify the routing strategy
-->



DataNode node of each attribute description:
Name: specify the logical data node name;
Physical host dataHost: specify the logical data node name;
Database: specify the physical host node, if there are multiple libraries on a node, can use the expression $0-99 db, specified a scale of 0-99 to the 100 database; -->

WriteType="0" dbType="mysql" dbDriver="JDBC" switchType="1" slaveThreshold="100" & gt;
Select the user () & lt;/heartbeat>






2, the server.xml
 
<? The XML version="1.0" encoding="utf-8"?>
- you may not use this file except in the compliance with the License. - you
May obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software -
Distributed under the License is distributed on an "AS is" BASIS, - WITHOUT
WARRANTIES OR the CONDITIONS OF ANY KIND, either express OR implied) - See the
License for the specific language governing permissions and limitations -
Under the License. - & gt;



















-->










3, rule. The XML
 
<? The XML version="1.0" encoding="utf-8"?>
- you may not use this file except in the compliance with the License. - you
May obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software -
Distributed under the License is distributed on an "AS is" BASIS, - WITHOUT
WARRANTIES OR the CONDITIONS OF ANY KIND, either express OR implied) - See the
License for the specific language governing permissions and limitations -
Under the License. - & gt;
  • Related