mysql实例化_mysql多实例实例化数据库

实例化数据库:/usr/local/mysql/scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/m_data/nduoa/db

启动实例数据库: /usr/local/mysql/bin/mysqld_multi --defaults-extra-file=/usr/local/mysql/etc/my.cnf --user=mysql start 3307

停止实例数据库:/usr/local/mysqlinstance/bin/mysqld_multi --defaults-extra-file=/usr/local/mysqlinstance/etc/my.cnf --user=root --password=aibei1010 stop 3310

start slave;

show slave status \G

show master status \G

GRANT REPLICATION SLAVE ON *.* TO 'repl'@'192.168.0.193' IDENTIFIED BY 'aibei1010!!';

GRANT REPLICATION SLAVE ON *.* TO 'repl'@'192.168.4.18' IDENTIFIED BY 'aibei1010!!';

change master to master_host='192.168.0.172', master_port=3311, master_user='repl', master_password='aibei1010!!', master_log_file='mysql-bin.000001', master_log_pos=4712;

start slave;

show slave status \G

change master to master_host='192.168.0.174', master_port=3311, master_user='repl', master_password='aibei1010!!', master_log_file='mysql-bin.000001', master_log_pos=4712;

start slave;

show slave status \G

mkdir /m_data/nduoa/db

mkdir /m_data/nduoa/logs

mkdir /m_data/nduoa/sock

mkdir /m_data/nduoa/run

mkdir /m_data/nduoa/tmp

mkdir /m_data/nduoa/binlogs

mkdir /m_data/nduoa/innodb

mkdir /m_data/nduoa/binlogs/mysql-bin

cp -r /m_data/iapppay/scripts /m_data/onepay

chown -R mysql.mysql /m_data/onepay

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值