Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use mycat global table

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "how to use the mycat global table". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn how to use the mycat global table.

Specific content

If we consider such a situation now:

Users need to classify users

Goods also need to be classified and preserved.

Then all designs must have a data dictionary table. Generally speaking, the amount of data in the data dictionary table is not very large, so now it is considered in mycat that such a data table can be defined as a global data table, and the characteristic of the global data table is that there will be this data table on all databases, but externally, it seems to be just a data table on a logical database.

This time, the host is as follows:

1. [mysql-server-*] create a database script:

2. [mycat-server-01] modify the configuration file: vim / usr/local/mycat/conf/schema.xml

Clearly indicates that the global table exists on both data nodes

TESTGDB,TESTMDB,TESTADB3, [mycat-server-01] modify the user's configuration file: vim / usr/local/mycat/conf/server.xml

4. [mycat-server-01] start the mycat service: / usr/local/mycat/bin/mycat console;5, [mysql-server-01] enter the data port of mycat:

INSERT INTO dict (title,content) VALUES ('news','mldn'); mysql- uroot-p123456-h292.168.122.190-P8066-DTESTADB6, [mysql-server-01] saves a new data dictionary data:

The so-called global table means that the data manipulated through MyCat will be saved directly to all databases.

Thank you for your reading, the above is the content of "how to use the mycat global table". After the study of this article, I believe you have a deeper understanding of how to use the mycat global table, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report