MySQL uses the Federated engine to append local data to the server.

Source: Internet
Author: User
Requirement: the server has two websites with the same structure as the local one, and the server has more data than the local one. In the early stage of the new project, you can add information locally to the database. During the local addition, the server data is also increasing. Now you need to append the newly added local data to the server. That is, set the local number

Requirement: the server has two websites with the same structure as the local one, and the server has more data than the local one. In the early stage of the new project, you can add information locally to the database. During the local addition, the server data is also increasing. Now you need to append the newly added local data to the server. That is, set the local number

Requirement: the server has two websites with the same structure as the local one, and the server has more data than the local one. In the early stage of the new project, you can add information locally to the database. During the local addition, the server data is also increasing. Now you need to append the newly added local data to the server. That is, the newly added data of the local database is directly copied to the server, and the original data on the server remains unchanged. We will start the following operations on the premise that the databases in both environments must be backed up! OK, Let's go! 1. Check whether local MySQL supports Federated. Run the cmd command line to enter MySQL and enter "show engines;". The following figure shows that MySQL supports Federated. If MySQL does not support Federated, click here: Start the Federated Engine of MySQL in Windows in step 3. 2. When downloading the latest data from the server to the local server, the data image is actually sent to the local server. Both the server and local servers are synchronized. The data on either side changes, and the data on the other side also changes. The premise is that the remote IP permission must be enabled for the database on the server side. Otherwise, no permission is prompted. Modify the Database Host permission to "%" instead of "localhost" for any host. Execute the SQL statement directly. The following is an SQL statement: CREATE TABLE 'news _ data_FEDERATED '('id' mediumint (8) UNSIGNED DEFAULT '0 ',

Persuasive essay writer

'Content' mediumtext not null, 'readpoint' SMALLINT (5) unsigned not null default '0', 'groupids _ view' VARCHAR (100) not null, 'paginationtype' tinyint (1) not null, [...]

Original article address: MySQL uses the Federated engine to append local data to the server. Thank you for sharing.

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.