使用mysqlreplicate快速搭建MySQL主从(2)

Test Description                                                    Status

---------------------------------------------------------------------------

Checking for binary logging on master                                [pass]

Are there binlog exceptions?                                        [pass]

Replication user exists?                                            [pass]

Checking server_id values                                            [pass]

Checking server_uuid values                                          [pass]

Is slave connected to master?                                        [pass]

Check master information file                                        [pass]

Checking InnoDB compatibility                                        [pass]

Checking storage engines compatibility                              [pass]

Checking lower_case_table_names settings                            [pass]

Checking slave delay (seconds behind master)                        [pass]

#

# Slave status:

#

Slave_IO_State : Waiting for master to send event

Master_Host : 192.168.1.250

Master_User : mysync

Master_Port : 3306

Connect_Retry : 60

Master_Log_File : mysql-bin.000003

Read_Master_Log_Pos : 384741

Relay_Log_File : HE1-relay-bin.000004

Relay_Log_Pos : 384954

Relay_Master_Log_File : mysql-bin.000003

Slave_IO_Running : Yes

Slave_SQL_Running : Yes

Replicate_Do_DB :

Replicate_Ignore_DB :

Replicate_Do_Table :

Replicate_Ignore_Table :

Replicate_Wild_Do_Table :

Replicate_Wild_Ignore_Table :

Last_Errno : 0

Last_Error :

Skip_Counter : 0

Exec_Master_Log_Pos : 384741

Relay_Log_Space : 1743112

Until_Condition : None

Until_Log_File :

Until_Log_Pos : 0

Master_SSL_Allowed : No

Master_SSL_CA_File :

Master_SSL_CA_Path :

Master_SSL_Cert :

Master_SSL_Cipher :

Master_SSL_Key :

Seconds_Behind_Master : 0

Master_SSL_Verify_Server_Cert : No

Last_IO_Errno : 0

Last_IO_Error :

Last_SQL_Errno : 0

Last_SQL_Error :

Replicate_Ignore_Server_Ids :

Master_Server_Id : 1250

Master_UUID : 1b1daad8-b501-11e6-aa21-000c29c6361d

Master_Info_File : /data/mysql/master.info

SQL_Delay : 0

SQL_Remaining_Delay : None

Slave_SQL_Running_State : Slave has read all relay log; waiting for more updates

Master_Retry_Count : 86400

Master_Bind :

Last_IO_Error_Timestamp :

Last_SQL_Error_Timestamp :

Master_SSL_Crl :

Master_SSL_Crlpath :

Retrieved_Gtid_Set :

Executed_Gtid_Set :

Auto_Position : 0

Replicate_Rewrite_DB :

Channel_Name :

Master_TLS_Version :

# ...done.

其他常用工具

Part1:mysqldiskusage检查数据库空间大小

[root@HE1 ~]# mysqldiskusage --server=sys_admin:MANAGER@localhost

WARNING: Using a password on the command line interface can be insecure.

# Source on localhost: ... connected.

# Database totals:

+---------------------+--------------+

| db_name            |      total  |

+---------------------+--------------+

| maxscale_schema    | 14,906      |

| mysql              | 14,250,013  |

| performance_schema  | 818,071      |

| sys                | 500,802      |

| wms                | 925,929,868  |

+---------------------+--------------+

Total database disk usage = 941,513,660 bytes or 897.90 MB

#...done.

Part2:mysqlindexcheck检查冗余索引

[root@HE1 ~]# mysqlindexcheck --server=sys_admin:MANAGER@localhost wms

WARNING: Using a password on the command line interface can be insecure.

# Source on localhost: ... connected.

# The following index is a duplicate or redundant for table wms.auth_user:

#

CREATE UNIQUE INDEX `index_user_name` ON `wms`.`auth_user` (`user_name`) USING BTREE

#    may be redundant or duplicate of:

CREATE INDEX `user_name` ON `wms`.`auth_user` (`user_name`, `state`) USING BTREE

# The following index is a duplicate or redundant for table wms.basic_storeage_sapce:

#

CREATE INDEX `idx_store_district_space_no` ON `wms`.`basic_storeage_sapce` (`store_id`, `district_id`, `store_space_no`) USING BTREE

#    may be redundant or duplicate of:

CREATE UNIQUE INDEX `idx_store_district_space_no_un` ON `wms`.`basic_storeage_sapce` (`store_id`, `district_id`, `store_space_no`) USING BTREE

——总结——

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/a6bdf5fa269d0af6b64aaf1c5c2bb8d1.html