In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the knowledge of "how to configure Federated engine on MySQL database". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
To configure the Federated engine, you need a version above MySQL5.0. The specific configuration method is as follows:
1. Check to see if the federated engine is installed
Enter command: show engines
The results are as follows:
Engine Support Comment Transactions XA Savepoints
MEMORY YES Hash based, stored in memory, useful for temporary tables NO NO NO
FEDERATED NO Federated MySQL storage engine
MyISAM YES Default engine as of MySQL 3.23 with great performance NO NO NO
BLACKHOLE YES / dev/null storage engine (anything you write to it disappears) NO NO NO
MRG_MYISAM YES Collection of identical MyISAM tables NO NO NO
CSV YES CSV storage engine NO NO NO
ARCHIVE YES Archive storage engine NO NO NO
InnoDB DEFAULT Supports transactions, row-level locking, and foreign keys YES YES YES
It can be seen that the federated engine is not turned on.
two。 Turn on the federated engine
Add federated to my.ini under windows to enable it.
In linux, you need to add an option at compile time, and then add federated to my.ini to open it.
3. Establish a link to a remote data table
Suppose you have a database dbtestA on ServerA and a database dbtestB on ServerB, and you want to establish a data table link remote_tabletestA of table tabletestA on ServerA's database dbtestA on ServerB's database dbtestB, with the following statement:
The following is a code snippet:
Double-click the code to select all 1create table remote_tabletestA. Engine=federated connection = 'MySQL://root:123123@ServerA:3306/dbtestA/tabletestA'
4. Use remote data table links
As in the example above, we operate on the table remote_tabletestA directly on the database dbtestB of ServerB, that is, we operate on the table table of database dbtestA on ServerA.
That's all for "how to configure the Federated engine on the MySQL database". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.