TAILIEUCHUNG - High Availability MySQL Cookbook phần 6

Kiểm tra rằng chuyển đổi dự phòng hoạt động bằng cách giết chết một nút quản lý, lần lượt, các nút quản lý còn lại tiếp tục làm việc. Đó là đôi khi cần thiết để thêm một nút quản lý một cụm hiện tại nếu ví dụ, do thiếu các phần cứng hoặc thời gian, một nhóm ban đầu chỉ có một nút quản lý duy nhất. | Chapter 3 Disk-based tables do not support variable length fields these fields are stored as fixed-width fields for example VARCHAR 100 is stored as CHAR 100 . This means that a disk-based NDB table that uses lots of variable-width fields will take up significantly more space than it would as compared to either an NDB in-memory table or a non-clustered storage engine format. How to do it. Firstly check that you have sufficient storage on your storage nodes using a command such as df as follows root@node1 df -h grep mysql-cluster 165M 9 var lib mysql-cluster 68M 4 var lib mysql-cluster BACKUPS In this example there is space available in the Data Directory. For this example using a small amount of test data this is sufficient. Create a log file and undo file mysql CREATE LOGFILE GROUP world_log ADD UNDOFILE iNiTIAL_SIZE 200M ENGINE NDBCLUSTER Query OK 0 rows affected sec These files are created by default in the subfolder ndb_nodeid_fs in DataDir on each storage node. However it is possible to pass an absolute path to force the undo file previous one and data file next step to be created on another filesystem or use symbolic links. You can also specify an UNDO log size. See the There s more. section for an example. Now create a TABLESPACE using the CREATE TABLESPACE SQL command you can execute this on any SQL node in the cluster mysql CREATE TABLESPACE world_ts ADD DATAFILE USE lOgFiLE group world_log INITIAL_SIZE 500M ENGINE NDBCLUSTER Query OK 0 rows affected sec MySQL Cluster Management ---------------- Now you can create disk-based tables as follows mysql CREATE TABLE City - ID int 11 NOT NULL auto_increment - Name char 35 NOT NULL default - CountryCode char 3 NOT NULL default - District char 20 NOT NULL default - Population int 11 NOT NULL default 0 - PRIMARY KEY ID - - TABLESPACE world_ts STORAGE DISK - ENGINE NDBCLUSTER Query OK 0 rows affected sec Note that in this example the ID field will

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.