Configuring MyCAT
- Configure the server file. The server file stores MyCAT configuration parameters, port, and user data.
- Open the file.
1vim /usr/local/mycat/conf/server.xml - Modify the following information in bold and comment out lines 122 to 129:
- password: password of the service user
- schemas: logical database. This document uses sysbench as an example.
- defaultSchema: default logical database. This document uses sysbench as an example.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
<user name="root" defaultAccount="true"> <property name="password">1234567</property> <property name="schemas">sysbench</property> <property name="defaultSchema">sysbench</property> <!--No MyCAT Database selected. This error is reported if the schema is not set (null). The system attempts to use sysbench as the schema before this error prompts.--> <!-- Table-level DML permission setting --> <!-- <privileges check="false"> <schema name="TESTDB" dml="0110" > <table name="tb01" dml="0000"></table> <table name="tb02" dml="1111"></table> </schema> </privileges> --> </user> <!-- <user name="user"> <property name="password">user</property> <property name="schemas">TESTDB</property> <property name="readOnly">true</property> <property name="defaultSchema">TESTDB</property> </user> -->

- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the file.
Parent topic: Deploying MyCAT Database Sharding