In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the Centos7 MYSQL reading and writing separation experiment process sharing, which involves things, learned from the theoretical knowledge, there are many books, literature for your reference, from the practical point of view, accumulated years of practical experience can be shared with you.
Mysql introduction
MySQL is a relational database management system developed by the Swedish company MySQL AB and currently belongs to the products of Oracle. MySQL is one of the most popular relational database management systems. In terms of WEB applications, MySQL is the best RDBMS (relational database management system) application software.
MySQL is a relational database management system in which relational databases store data in different tables instead of all data in one large warehouse, which increases speed and flexibility.
The SQL language used by MySQL is the most commonly used standardized language for accessing databases. MySQL software adopts the dual licensing policy, which is divided into community version and commercial version. Because of its small size, high speed and low total cost of ownership, especially open source, the development of small and medium-sized websites generally choose MySQL as the website database.
Pre-installation preparation
3 mysql CVMs (this time using 3 mysql version 5.7)
One centos server (used to install amoeba)
Amoeba installation package java environment package
Lab steps to turn off firewall self-startup And related functions and enhanced security functions systemctl stop firewalld.service setenforce 0 time synchronization yum install ntp-yvim / etc/ntp.conf add server 127.127.100.0 # # Local clock source fudge 127.127.100.0 stratum 8 # # set the time level to 8service ntpd start # # enable service / usr/sbin/ntpdate 192.168.100.100 # to perform time synchronization mysql master server Configure vim / etc/my.cnf on the server to add server-id=1log-bin=master-bin # # master server log file log-slave-updates=true # # update binary log service mysqld restartmysql-u root-p # from the server to mysql database GRANT REPLICATION SLAVE ON *. * TO 'myslave'@'192.168.100.%' IDENTIFIED BY' 123456' under [mysqld]. # # give permission to respond to slave server FLUSH PRIVILEGES; # # refresh data show master status +-+ | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | +- -+-+ | master-bin.000002 | 339 | +- -+ 1 row in set (0.00 sec) mysql slave configuration vim / etc/my.cnf add server-id=11relay-log=relay-log-bin under [mysqld] # # synchronize log file records from the master server to the local relay-log-index=slave-relay-bin.index # # define the location and name of the relay-log # # the serverid of the second slave server cannot be the same service mysqld restart # # restart the service mysql -u root-p # # enter mysql database change master to master_host='192.168.100.100' Master_user='myslave',master_password='123456',master_log_file='master-bin.000002',master_log_pos=339 # # configuring Master Server start slave # # enable synchronization show slave status\ G; # # check the synchronization status to verify whether the master-slave server is enabled successfully. Create database test; on the master server and show databases on the slave server. If you can see the test, it shows that the amoeba service has been successfully installed and configured. It is recommended to use the environment package cp jdk-6u14-linux-x64.bin / usr/local//usr/local/jdk-6u14-linux-x64.bin of java 1.6. continue to enter yes. Press enter to complete the configuration of the java environment mv jdk1.6.0_14/ / usr/local/jdk1.6vim / etc/profile and add export JAVA_HOME=/usr/local/jdk1.6export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/libexport PATH=$JAVA_HOME/lib:$JAVA_HOME/jre/bin/:$PATH:$HOME/binexport AMOEBA_HOME=/usr/local/amoebaexport PATH=$PATH:$AMOEBA_HOME/binsource / etc/profile # # at the end to make the configuration effective mkdir / Usr/local/amoeba # # create amoeba server location tar zxvf amoeba-mysql-binary-2.2.0.tar.gz-C / usr/local/amoeba/ # # decompress amoebachmod-R 755 / usr/local/amoeba # # give amoeba permission / usr/local/amoeba/bin/amoeba## display amoeba start | stop indicates that the installation succeeded and added permission on three mysql to open amoeba access to grant all on *. * to test@'192.168.100.%' identified by '123.com' Go back to the amoeba server cd / usr/local/amoebavim conf/amoeba.xml---30 line-- # # username amoeba----32 line-# # password 123456 amoeba----32 line-uncomment-master # # default pool master # # write pool slaves # # read pool vi conf/dbServers.xml--23-- mysql server generic database name-mysql--26-29 -- uncomment-- test 123.commur42-- Master server address-192.168.100.100 copyright 52-Slave server hostname-55-Slave server address-- 192.168.100.101 will copy and configure slave2 and its ip address-- 63-Slave server address pool-- from six lines of the server.
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
Wget-no-cookies-no-check-certificate header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; ora
© 2024 shulou.com SLNews company. All rights reserved.