In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
The following mainly brings you a variety of problem solutions in the process of MySql MMM deployment. I hope these words can bring you practical use, which is also the main purpose of this article when I edit MySql's MMM deployment process. All right, don't talk too much nonsense, let's just read the following.
Experimental environment:
Two centos7 CVMs are used as mysql master CVMs: master01/master02
Two centos7 CVM do mysql from CVM: slave01/slave02
A centos7 CVM for monitoring CVM: monitor
Problem 1: master01 creates a new database to view on abc,slave01, without data synchronization.
The master01 database query is as follows:
MariaDB [(none)] > show databases;+-+ | Database | +-+ | information_schema | | abc | | mysql | | performance_schema | | test |
The slave01 database query is as follows:
MariaDB [(none)] > show databases;+-+ | Database | +-+ | information_schema | | mysql | | performance_schema | | test | +-+ / / the newly created data table is not synchronized
Resolution process:
1. Check the configuration of slave01:
MariaDB [(none)] > show slave status\ GLast_IO_Error: error connecting to master 'replication@192.168.109.129:3306'-retry-0 message: Access denied for user' replication'@'192.168.109.159' (using password: YES) / / do not understand. / / restart the service, there is a new error MariaDB [(none)] > stop slave;Query OK, 0 rows affected (0.01 sec) MariaDB [(none)] > start slave-> Query OK, 0 rows affected (0.00 sec) MariaDB [(none)] > show slave status\ Gpolitio error: Fatal error: The slave or the O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the-- replicate-same-server-id option must be used on slave s does not always make sense; please check the manual before using it). / / roughly means that the same server-id is used
2. View it in the configuration file
Vim / etc/my.cnf / / found that both the server-id of master01 and that of master01 are set to 1 and modified to different server-id
3. Restart the service
[root@localhost ~] # systemctl stop mariadb.service [root@localhost ~] # systemctl start mariadb.service [root@localhost ~] # systemctl start mysql-mmm-agent.service [root@localhost ~] # systemctl enable mysql-mmm-agent.service
4. Use moniror to check the synchronization
[root@localhost mysql-mmm] # mmm_control showERROR: Can't connect to monitor daemon! / / still no!
Problem 2: moniror CVM cannot obtain the node information. The error is as follows:
MariaDB [(none)] > show slave status\ G Last_Error: Error 'Can't drop database' school'; database doesn't exist' on query. Default databasool'. Query: 'drop database school'
Resolution process:
1. If you read the error message, you can see that when I was testing the synchronization of the master CVM, I created the deleted school database. Because the slave has not been synchronized from the CVM, the process is stuck and cannot proceed to the next step, so the deployment is not successful.
2. After manually creating a new school database from the CVM and letting the system recognize it, you can delete the database again and again.
MariaDB [(none)] > create database school;Query OK, 1 row affected (0.00 sec) MariaDB [(none)] > show databases +-+ | Database | +-+ | information_schema | | mysql | | performance_schema | | school | | test | +-+
3. If it still fails, exit the database and restart the service.
MariaDB [(none)] > quitBye [root@slave02 ~] # [root@slave02 ~] # systemctl restart mariadb.service
4. Enter the database again and the school database has been deleted automatically and is the same as the master01 database.
MariaDB [(none)] > show databases;+-+ | Database | +-+ | information_schema | | abc | | mysql | | performance_schema | | test | +-+
5. Use the monitoring CVM monitor to check the success of the node.
[root@localhost mysql-mmm] # mmm_control show db1 (192.168.109.129) master/ONLINE. Roles: writer (192.168.109.188) db2 (192.168.109.160) master/ONLINE. Roles: db3 (192.168.109.162) slave/ONLINE. Roles: reader (192.168.109.189) db4 (192.168.109.159) slave/ONLINE. Roles: reader (192.168.109.190)
The experiment was successful.
Do you find it very helpful to solve all kinds of problems in the process of MMM deployment of MySql? If you need to know more, please continue to follow our industry information. I'm sure you'll like it.
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.