Linux centos 6.3 Mysql slave Install

  • 来源:本站
  • 发布时间:2019-08-13
  • 1已阅读
您现在的位置:首页 >> 西方诗歌 >> 文章
简介 https:///fly2wind/TSShellScript#!/bin/sh########################################################

	Linux centos 6.3 Mysql slave Install

https:///fly2wind/TSShellScript#!/bin/sh##########################################################################################InstallMySQLScript##ShawnMa##########################################################################################DefineTARGET==http:///Downloads//$TARGET#Createabuilddirectorymkdir-p/opt/install/mysqlcd/opt/install/mysql#Prepareforcompilationsourcecurl-o$TARGET$SOURCEmkdir-ptmptar-zxvf$TARGET-Ctmp#Installbuilddependenciesyuminstall-ygccgcc-c++makecmakeautoconfautomakeyuminstall-ybisonncurses-devel#CreateaUserGroupgroupaddmysqluseradd-r-gmysqlmysql#Compileanddeploymvtmp/*sourcecdsourcecmake\-DCMAKE_INSTALL_PREFIX=/opt/server/database/mysql_slave\-DSYSCONFDIR=/opt/server/database/mysql_slave\-DMYSQL_UNIX_ADDR=/opt/server/database/mysql_slave/tmp/\-DMYSQL_TCP_PORT=3307\-DMYSQL_DATADIR=/opt/server/database/mysql_slave/data\-DDEFAULT_CHARSET=utf8\-DDEFAULT_COLLATION=utf8_general_ci\-DWITH_EXTRA_CHARSETS:STRING=all\-DWITH_INNOBASE_STORAGE_ENGINE=1\-DWITH_READLINE=1\-DENABLED_LOCAL_INFILE=1\-DWITH_DEBUG=OFF\-DMYSQL_USER=mysqlmakemakeinstall#Postinstallationsetupcd/opt/server/database/mysql_/mysql_install_db--user=#Configurationcpsupport-files/"/\[mysqld\]$/a\datadir=\/opt\/server\/database\/mysql_slave\/data/""s/^server-id.*/server-id=2/g"//etc//mysql_slavechmoda+x/etc//mysql_slave##chkconfig--addmysql##chkconfig--level345mysqlon#####Additional/etc//mysql_slavestartbin/mysqladmin-urootpassword""bin/"GRANTALLON*.*TOroot%IDENTIFIEDBYWITHGRANTOPTION;FLUSHPRIVILEGES;"bin/"changemastertomaster_host=,master_port=3306,master_user=backup,master_password=backup,master_log_file=,master_log_pos=326;"bin/"startslave;"/etc//mysql_slavestop。