Mysql集群
1. 在MySQL源代码目录下新建脚本 install.sh,把下面的代码添加到这个脚本中:
#!/bin/bash
############################################
######### MySQL Server Config ##############
############################################
#Determine to install MySQL server
#"0" means do not install server programs
INST_SERVER=1
#MySQL installation path
INST_PATH="/usr/local/mysql"
#Define the ports of MySQL installation, intput strings of
#PORT with whitespace separated.
#e.g. "3306 3307" means install two MySQL servers:
# The first server will be installed to $INST_PATH/1 and listen 3306 port.
# The second server will be installed to $INST_PATH/2 and listen 3307 port.
# ... ...
INST_PORTS="3306"
#The management server information
MGM_HOST="192.168.1.253"
MGM_PORT="2200"
###########################################
######### MySQL Cluster Config ############
###########################################
#Determine to install cluster
#"0" means do not install cluster programs
INST_CLUSTER=1
#Define COMPUTERs in config.ini, intput strings of HostName with
#whitespace separated.
#The Id attribute is auto increment and start with 1.
#e.g. "192.168.1.253 192.168.252" will generate the following code
# [COMPUTER]
# Id=1
# HostName=192.168.1.253
# [COMPUTER]
# Id=2
# HostName=192.168.1.252
COMPUTERS="192.168.1.253 192.168.1.252"
#Define MGMs in config.ini, intput strings of HostName with whitespace separated.
#e.g. "192.168.1.253 192.168.252" will generate the following code
# [MGM]
# HostName=192.168.1.253
# [MGM]
# HostName=192.168.1.252
MGMS="192.168.1.253"
#Define DBs in config.ini, intput ids of ExecuteOnComputer with whitespace separated.
#e.g. "1 2" will generate the following code
# [DB]
# ExecuteOnComputer=1
# [DB]
# ExecuteOnComputer=2
DBS="1"
#Define APIs in config.ini, intput ids of ExecuteOnComputer with whitespace separated.
#e.g. "1 0 1 2" will generate the following code
# [API]
# ExecuteOnComputer=1
# [API]
# [API]
# ExecuteOnComputer=1
# [API]
# ExecuteOnComputer=2
APIS="1 0 2 2"
######################################################################
########## Starting to install programs, do not modify them! #########
######################################################################
echo "Starting to install programs" > install.log
#Find installation path
if [ $# -gt 0 ]
then
INST_PATH="{GetProperty(Content)}"
else
INST_PATH="/usr/local/mysql"
fi
if [ 0 -lt $INST_SERVER ]
then
echo "Now, installing the MySQL servers..."
#Loop to install mysql servers
INSTALLED_SERVER_COUNT=1
for PORT in $INST_PORTS
do
#Define the current mysql server installation path
MYSL_PATH=$INST_PATH/$INSTALLED_SERVER_COUNT
#Configure mysql server
echo "Exec ./configure --prefix=$MYSL_PATH --with-pthread
--with-unix-socket-path=$MYSL_PATH/var/mysql.sock --with-mysqld-user=root
--with-tcp-port=$PORT --with-charset=gbk --with-ndbcluster" >> install.log
./configure --prefix=$MYSL_PATH --with-pthread
--with-unix-socket-path=$MYSL_PATH/var/mysql.sock
--with-mysqld-user=root --with-tcp-port=$PORT
--with-charset=gbk --with-ndbcluster
#Make mysql server
echo "Exec make && make install" >> install.log
make && make install
#Create var directory for mysql data
mkdir -p $MYSL_PATH/var
#Create my.cnf
echo "Create $MYSL_PATH/var/my.cnf" >> install.log
echo "[client]" > $MYSL_PATH/var/my.cnf
echo "port=$PORT" >> $MYSL_PATH/var/my.cnf
echo "socket=$MYSL_PATH/var/mysql.sock" >> $MYSL_PATH/var/my.cnf
echo "" >> $MYSL_PATH/var/my.cnf
echo "[mysqld]" >> $MYSL_PATH/var/my.cnf
echo "ndbcluster" >> $MYSL_PATH/var/my.cnf
echo "ndb_connectstring=host=$MGM_HOST:$MGM_PORT" >> $MYSL_PATH/var/my.cnf
echo "user=root" >> $MYSL_PATH/var/my.cnf
echo "port=$PORT" >> $MYSL_PATH/var/my.cnf
echo "basedir=$MYSL_PATH/" >> $MYSL_PATH/var/my.cnf
echo "datadir=$MYSL_PATH/var/" >> $MYSL_PATH/var/my.cnf
echo "socket=$MYSL_PATH/var/mysql.sock" >> $MYSL_PATH/var/my.cnf
echo "default-character-set=gbk" >> $MYSL_PATH/var/my.cnf
echo "default-storage-engine=INNODB" >> $MYSL_PATH/var/my.cnf
echo "max_connections=500" >> $MYSL_PATH/var/my.cnf
echo "" >> $MYSL_PATH/var/my.cnf
echo "query_cache_size=33M" >> $MYSL_PATH/var/my.cnf
echo "table_cache=1520" >> $MYSL_PATH/var/my.cnf
echo "tmp_table_size=16M" >> $MYSL_PATH/var/my.cnf
echo "thread_cache=38" >> $MYSL_PATH/var/my.cnf
echo "" >> $MYSL_PATH/var/my.cnf
echo "#MyISAM Specific options" >> $MYSL_PATH/var/my.cnf
echo "#skip-myisam" >> $MYSL_PATH/var/my.cnf
echo "" >> $MYSL_PATH/var/my.cnf
echo "#INNODB Specific options" >> $MYSL_PATH/var/my.cnf
echo "#skip-innodb" >> $MYSL_PATH/var/my.cnf
chmod 755 $MYSL_PATH/var/my.cnf
#Install mysql database
echo "Exec $MYSL_PATH/bin/mysql_install_db" >> install.log
$MYSL_PATH/bin/mysql_install_db
#Create mysql control script
if [ -e $MYSL_PATH/share/mysql/mysql.server ]
then
#Use default mysql control script
#Create mysql server start script
echo "Create $MYSL_PATH/start" >> install.log
echo "$MYSL_PATH/share/mysql/mysql.server start" > $MYSL_PATH/start
echo "Chmod 755 $MYSL_PATH/start" >> install.log
chmod 755 $MYSL_PATH/start
#Create mysql server stop script
echo "Create $MYSL_PATH/stop" >> install.log
echo "$MYSL_PATH/share/mysql/mysql.server stop" > $MYSL_PATH/stop
echo "Chmod 755 $MYSL_PATH/stop" >> install.log
chmod 755 $MYSL_PATH/stop
#Create mysql server restart script
echo "Create $MYSL_PATH/restart" >> install.log
echo "$MYSL_PATH/share/mysql/mysql.server restart" > $MYSL_PATH/restart
echo "Chmod 755 $MYSL_PATH/restart" >> install.log
chmod 755 $MYSL_PATH/restart
else
#Use custom mysql control script
#Create mysql server start script
echo "Create $MYSL_PATH/start" >> install.log
echo "$MYSL_PATH/libexec/mysqld &" > $MYSL_PATH/start
echo "Chmod 755 $MYSL_PATH/start" >> install.log
chmod 755 $MYSL_PATH/start
#Create mysql server stop script
echo "Create $MYSL_PATH/stop" >> install.log
echo "$MYSL_PATH/bin/mysqladmin -u root -p shutdown" > $MYSL_PATH/stop
echo "Chmod 755 $MYSL_PATH/stop" >> install.log
chmod 755 $MYSL_PATH/stop
#Create mysql server restart script
echo "Create $MYSL_PATH/restart" >> install.log
echo "$MYSL_PATH/bin/mysqladmin -u root -p shutdown" > $MYSL_PATH/restart
echo "$MYSL_PATH/libexec/mysqld &" >> $MYSL_PATH/restart
echo "Chmod 755 $MYSL_PATH/restart" >> install.log
chmod 755 $MYSL_PATH/restart
fi
#Clean mysql server to get ready for the next installation
echo "Exec make clean" >> install.log
make clean
INSTALLED_SERVER_COUNT=$(($INSTALLED_SERVER_COUNT + 1))
done
echo "Configurations! MySQL servers has been installed successfully."
echo ""
echo "1. To start mysql server, use the following command:"

win11安装语言包错误0x800f0950什么原因?当我们在给windows11系统安装新语言包时,有时会遇到系统提示错误代码:0x800f0950,导致语言包安装流程无法继续进行下去。导致这个错误代码一般是什么原因,又要怎么解决呢?今天小编就来给大家说明一下win11安装语言包错误0x800f0950的具体解决步骤,有需要的用户们赶紧来看一下吧。win11电脑错误代码0x800f0950解决技巧1、首先按下快捷键“Win+R”打开运行,然后输入:Regedit打开注册表。2、在搜索框中输入“

GoogleDocs在学校和工作环境中变得很流行,因为它提供了文字处理器所期望的所有功能。使用Google文档,您可以创建文档、简历和项目提案,还可以与世界各地的其他用户同时工作。您可能会注意到GoogleDocs不包括MicrosoftWord附带的所有功能,但它提供了自定义文档的能力。使用正确的字体可以改变文档的外观并使其具有吸引力。GoogleDocs提供了大量字体,您可以根据自己的喜好从中选择任何人。如果您希望将自定义字体添加到Google文档,请继续阅读本文。在本文中

在Linux下更新curl版本,您可以按照以下步骤进行操作:检查当前curl版本:首先,您需要确定当前系统中安装的curl版本。打开终端,并执行以下命令:curl--version该命令将显示当前curl的版本信息。确认可用的curl版本:在更新curl之前,您需要确定可用的最新版本。您可以访问curl的官方网站(curl.haxx.se)或相关的软件源,查找最新版本的curl。下载curl源代码:使用curl或浏览器,下载您选择的curl版本的源代码文件(通常为.tar.gz或.tar.bz2

Notepad++主要由开发人员用于编辑源代码,由临时用户用于编辑文本。但是,如果您刚刚升级到Windows11,则在您的系统上下载和安装该应用程序可能具有挑战性。因此,我们将讨论在Windows11上下载和安装记事本++。此外,您可以轻松阅读我们关于修复Notepad++在Windows上没有响应的详细指南。记事本++可以在Windows11上运行吗?是的,记事本++可以在Windows11上有效工作,而不会出现兼容性问题。更具体地说,没有臃肿的选项或错误,只需在一个非常小的编辑器中即可。此外

Steam客户端无法识别您计算机上的任何游戏吗?当您从计算机上卸载Steam客户端时,会发生这种情况。但是,当您重新安装Steam应用程序时,它会自动识别已安装文件夹中的游戏。但是,别担心。不,您不必重新下载计算机上的所有游戏。有一些基本和一些高级解决方案可用。修复1–尝试在同一位置安装游戏这是解决这个问题的最简单方法。只需打开Steam应用程序并尝试在同一位置安装游戏即可。步骤1–在您的系统上打开Steam客户端。步骤2–直接进入“库”以查找您拥有的所有游戏。第3步–选择游戏。它将列在“未分类

<p><strong>HaloInfinite(Campaign)</strong>是一款第一人称射击视频游戏,于2021年11月推出,可供单人和多用户使用。该游戏是Halo系列的延续,适用于Windows、XboxOne和Xbox系列的用户X|S。最近,它还在PC版XboxGamePass上发布,以提高其可访问性。大量玩家报告在尝试使用WindowsPC上的<strong>Xbox应

我们深知MicrosoftWindows11是一个功能齐全且设计吸引人的操作系统。但是,用户一直要求Windows11Lite版本。尽管它提供了重大改进,但Windows11是一个资源匮乏的操作系统,它可能很快就会使旧机器混乱到无法顺利运行的地步。本文将解决您最常问的关于是否有Windows11Lite版本以及是否可以安全下载的问题。跟着!有Windows11Lite版本吗?我们正在谈论的Windows11Lite21H2版本是由Neelkalpa的T

虚拟机怎么安装Win11?近期有用户想要尝试使用VirtualBox虚拟机安装Win11,但是不太清楚具体的操作方法,针对这一情况,小编将为大家演示使用VirtualBox安装Win11的方法,很多小伙伴不知道怎么详细操作,小编下面整理了使用VirtualBox安装Win11的步骤,如果你感兴趣的话,跟着小编一起往下看看吧! 使用VirtualBox安装Win11的步骤 1、要下载VirtualBox,请前往VirtualBox官方下载页面,下载适用于Windows的.exe文件。如果你


ホットAIツール

Undresser.AI Undress
リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover
写真から衣服を削除するオンライン AI ツール。

Undress AI Tool
脱衣画像を無料で

Clothoff.io
AI衣類リムーバー

AI Hentai Generator
AIヘンタイを無料で生成します。

人気の記事

ホットツール

mPDF
mPDF は、UTF-8 でエンコードされた HTML から PDF ファイルを生成できる PHP ライブラリです。オリジナルの作者である Ian Back は、Web サイトから「オンザフライ」で PDF ファイルを出力し、さまざまな言語を処理するために mPDF を作成しました。 HTML2FPDF などのオリジナルのスクリプトよりも遅く、Unicode フォントを使用すると生成されるファイルが大きくなりますが、CSS スタイルなどをサポートし、多くの機能強化が施されています。 RTL (アラビア語とヘブライ語) や CJK (中国語、日本語、韓国語) を含むほぼすべての言語をサポートします。ネストされたブロックレベル要素 (P、DIV など) をサポートします。

SublimeText3 Linux 新バージョン
SublimeText3 Linux 最新バージョン

SublimeText3 Mac版
神レベルのコード編集ソフト(SublimeText3)

DVWA
Damn Vulnerable Web App (DVWA) は、非常に脆弱な PHP/MySQL Web アプリケーションです。その主な目的は、セキュリティ専門家が法的環境でスキルとツールをテストするのに役立ち、Web 開発者が Web アプリケーションを保護するプロセスをより深く理解できるようにし、教師/生徒が教室環境で Web アプリケーションを教え/学習できるようにすることです。安全。 DVWA の目標は、シンプルでわかりやすいインターフェイスを通じて、さまざまな難易度で最も一般的な Web 脆弱性のいくつかを実践することです。このソフトウェアは、

PhpStorm Mac バージョン
最新(2018.2.1)のプロフェッショナル向けPHP統合開発ツール
