In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1, environment: 2 servers 222,224, the system is Red Hat Enterprise Linux Server release 5.8. Each of the two servers has several databases. The database dzq on the 222server should be copied to the 224server.
First, change the table under the database dzq on the server to the myisam engine, such as:
Alter table students ENGINE=myisam
Alter table ly ENGINE=myisam
3, and then the mysql service on 222and 224 is turned off / etc/init.d/mysqld stop
4, create the dzq directory under the datadir of the mysql of the 224 server, and then use scp to copy the files under the directory dzq under the mysql datadir directory of the 224 server to the dzq directory of the mysql datadir directory of the 224 server, and change the permissions of the files.
Scp / opt/mysql/data/dzq/* root@192.168.140.224:/var/lib/mysql/dzq
[root@red1 dzq] # chown mysql:mysql db.opt
[root@red1 dzq] # chown mysql:mysql ly.frm
[root@red1 dzq] # chown mysql:mysql ly.MYD
[root@red1 dzq] # chown mysql:mysql students.frm
[root@red1 dzq] # chown mysql:mysql ly.MYI
[root@red1 dzq] # chown mysql:mysql students.MYD
[root@red1 dzq] # chown mysql:mysql students.MYI
5. Open the service / etc/init.d/mysqld start, enter the database, and then change the storage engine back to innodb.
Mysql > alter table ly engine=innodb
Mysql > alter table students engine=innodb
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.