In mysql-cluster, the SQL node (master) and the individual mysql server (slave) are copied from the master (error solution)

Source: Internet
Author: User

In mysql-cluster, the SQL node (master) and the Independent mysql server (slave) are used to copy (troubleshoot) The cluster environment: www.2cto.com mysql-cluster 7.2.8 (mysql 5.5.27; ndb 7.2.8) 192.168.55.11 mgm node (nodeid = 1) 192.168.55.10 data node (nodeid = 2) + SQL node (nodeid = 4) 192.168.55.9 data node (nodeid = 3) + SQL node (nodeid = 5) mySQL Server: 192.168.55.20.mysql start: #/var/lib/mysql/bin/mysqld_safe & close: #/var/lib/mysql/bin/mysqladmin shutdown to enter the database: #/var/lib/mysq L/bin/mysql-u root-p master/Slave environment with: www.2cto.com master: master (SQL node (nodeid = 4 )) [mysqld] server-id = 1 log-bin = mysql-bin binlog_format = row binlog-do-db = db_name1 binlog-do-db = db_name2 binlog-ignore-db = db_name3 from: slave (mysql) [mysqld] server-id = 3 log-bin = mysql-bin binlog_format = row binlog-do-db = db_name1 binlog-do-db = db_name2 binlog-ignore-db = db_name3 55.133 55.9 # mysqld_safe -- ndb_n Odeid = 5 -- user = mysql -- server_id = 1 & # mysql-u mysql-p mysql> show master status; + metric + ---------- + ------------------ + ---------------- + | File | Position | Binlog_Do_DB | usage | + usage + ---------- + ------------------ + | mysql-bin.000003 | 112 | db_name1, db_name2 | db_name3 | + ------------------ + ---------- + ------------------ + 1 row in set (0.00 sec) mysql> grant replication slave on *. * to slavemysql@192.168.211.133 identified by '000000'; # Switch to root mysql> flush privileges if the permission is insufficient; 55.133 #/var/lib/mysql/bin/mysqld_safe & #/var/lib/mysql/bin/mysql-u root-p mysql> change master to master_host = '2017. 168.55.9 ', master_user = 'slaveuser', master_password = '000', master_log_file = 'mysql-bin.000003', master_log_pos = 112; mysql> st Art slave; mysql> show slave status \ G; error: Last_IO_Error: error connecting to master 'slaveuser @ 192.168.55.9: 3306 '-retry-time: 60 retries: 86400, but pass: # mysql-h 192.168.55.9-u slavemysql-p can successfully log on to the database on remote 9. # On mysql 55.9> grant all on *. * toslavemysql@192.168.211.133 identified by '20140901'; the authorization has been successful and the error has been fixed: see: http://www.bkjia.com/database/201212/175808.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.