Database middleware 03-MYCAT User Configuration __ Database

Source: Internet
Author: User
When we first log in using a client, we can use an account with a name of root and a password of 123456. This account is a default user created by Mycat to us, so where is the user assigned or how to create it? The problem is actually very simple, we see in the Mycat directory there is a conf directory, which is used to store the configuration file directory, which has a configuration file called Server.xml. Open this file, we are very aware of the user's configuration.
<?xml version= "1.0" encoding= "UTF-8"?> <!
DOCTYPE mycat:server SYSTEM "Server.dtd" >
<mycat:server xmlns:mycat= "http://io.mycat/" >
    <user Name= "root" >
        <property name= "password" >123456</property>
        <property name= "Schemas" > Testdb</property>

        <!--table-level DML permission settings-->
        <!--         
        <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>
    </user >

</mycat:server>

With some of the other configurations removed, we can see that users can configure the user's configuration by nesting the property tags by configuring the user to connect to them via the User tab. For example password is the password, schemas is able to connect the database. Permissions can also be configured under user.
This configuration file makes it clear that the Mycat user configuration is available. If you want to add a new user, it's OK to simply append a username tag. Specify the password and the connected database under the User tab. Of course, the database here is a virtual library that is configured in the Schema.xml configuration file. Multiple schemas are separated with commas.
The user configuration about Mycat is over here.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.