TAILIEUCHUNG - High Availability MySQL Cookbook phần 8

Trong một máy chủ bận rộn, điều này có thể mất một thời gian. Chờ cho lệnh để hoàn thành trước khi chuyển. Tạo một khối lượng ảnh chụp trong cửa sổ 2, đi qua một cái tên mới (mysql_snap), và vượt qua kích thước đó sẽ được dành cho việc giữ các dữ liệu rằng những thay đổi trong quá trình sao lưu, và đường dẫn đến khối lượng hợp lý mà các thư mục dữ liệu MySQL cư trú vào lúc:. | Chapter 5 In a busy server this may take some time. Wait for the command to complete before moving on. Create a snapshot volume in window 2 passing a new name mysql_snap and pass the size that will be devoted to keeping the data that changes during the course of the backup and the path to the logical volume that the MySQL data directory resides on root@node1 lib lvcreate --name mysql_snap --snapshot --size 200M dev system mysql Rounding up size to full physical extent MB Logical volume mysql_snap created Return to window 1 and check the master log position mysql SHOW MASTER STATUS --------------- ---------- --------------- ----------------- File Position Binlog_Do_DB Binlog_Ignore_DB --------------- ---------- --------------- ----------------- 997 --------------- ---------- --------------- ----------------- 1 row in set sec Only after the Ivcreate command in window 2 gets completed unlock the tables mysql UNLOCK TABLES Query OK 0 rows affected sec The next step is to move the data on this snapshot to the slave. On the master mount the snapshot root@node1 lib mkdir mnt mysql-snap root@node1 lib mount dev system mysql_snap mnt mysql-snap On the slave stop the running MySQL server and rsync the data over root@node2 mysql rsync -e ssh -avz node1 mnt mysql-snap var lib mysql root@node1 s password receiving file list . done mysql-snap mysql-snap ib_logfile0 mysql-snap ib_logfile1 High Availability with MySQL Replication ------------------------------------- mysql-snap ibdata1 . mysql-snap world sent 1794 bytes received 382879 bytes bytes sec total size is 22699298 speedup is Ensure the permissions are set correctly on the new data and start the MySQL slave server root@node2 mysql chown -R mysql mysql var lib mysql root@node2 mysql service mysql start Starting MySQL. OK Now carry out the CHANGE MASTER TO command in the Setting up slave with master having same data section of this recipe to tell the slave where the master

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.