In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Next, let's learn about MySQL database management-migration table operation steps. I believe you will benefit a lot after reading it. I hope that MySQL database management-migration table operation steps is what you want.
By copying the ibd file of the InnoDB table, the InnoDB table is migrated from the source database to the target database, similar to Oracle TTS. Transfer tablespace restrictions: 1 read_only MySQL version 5.6.6 or above, source and destination versions are recommended to be GA version and large version is the same, table engine is innodb and independent tablespace (innodb_file_per_table=1) 3 is enabled, tables in the exported state are only allowed to read, that is, "read_only" status 4 DISCARD TABLESPACE does not support partitioned tables [5.6.17] and when there is a foreign key relationship on the table, the foreign_key_check needs to be set to 05, and the page size of the source and target instances must be the same size. IMPORT TABLESPACE does not force foreign key constraint checking, so you need to export both the main table and child tables, and then import the source database [root@wallet01 ~] # su-mysql [mysql@wallet01 ~] $mysqldump-uroot-pabcd.1234-d tpcc customer > customer.sql [mysql@wallet01 ~] $scp customer.sql 192.168.1.202:/home/mysql [mysql@wallet01 ~] $mysql-uroot-pabcd.1234mysql > use tpcc100Database changedmysql > select count (*) from customer in the target instance. +-+ | count (*) | +-+ | 1500000 | +-+ 1 row in set (0.33 sec) target library [root@wallet02 ~] # su-mysql [mysql@wallet02 ~] $mysql-uroot-pabcd.1234mysql > create database tpcc;Query OK, 1 row affected (0.05sec) mysql > use tpccDatabase changedmysql > source customer.sqlQuery OK, 0 rows affected (0.01sec) mysql > alter table customer discard tablespace Query OK, 0 rows affected (0.03 sec) source library mysql > flush table customer for export;Query OK, 0 rows affected (0.00 sec) [mysql@wallet01 ~] $cd / usr/local/mysql/data/tpcc [mysql@wallet01 tpcc] $scp customer.cfg 192.168.1.202:/usr/local/mysql/data/tpcc [mysql@wallet01 tpcc] $scp customer.ibd 192.168.1.202:/usr/local/mysql/data/tpccmysql > unlock tables Query OK, 0 rows affected target library mysql > alter table customer import tablespace; Query OK, 0 rows affected (11.52 sec) mysql > select count (*) from customer;+-+ | count (*) | +-+ | 1500000 | +-+
1 row in set (0.37 sec)
After reading this article on MySQL Database Management-steps for moving tables, many readers will want to know more about it. If you need more industry information, you can follow our industry information section.
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.