本篇内容主要讲解“怎么安装percona server 5.7”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“怎么安装percona server 5.7”吧!
1 如果机器上有 rpm 包 安装的,一定要将默认的/etc/my.cnf mv 掉,防止后面的初始化 启动出现错误
2 初始化的时候注意参数的顺序 –defaults-file 放在前面一些
/home/mysql/mysql/bin/mysql -S /home/mysql/my3313/run/mysql.sock -uroot -p
set password for 'root'@'localhost'='mx3h7ccZ3RO';
/home/mysql/mysql/bin/mysqld –defaults-file=/home/mysql/my3311.cnf –initialize –user=mysql –basedir=/home/mysql/mysql –datadir=/home/mysql/my3311/data
/home/mysql/mysql/bin/mysqld_safe –defaults-file=/home/mysql/my3311.cnf –user=mysql > /tmp/mysql_star.log 2>&1 &
/home/mysql/mysql/bin/mysqld –defaults-file=/home/mysql/my3312.cnf –initialize –user=mysql –basedir=/home/mysql/mysql –datadir=/home/mysql/my3312/data
/home/mysql/mysql/bin/mysqld_safe –defaults-file=/home/mysql/my3312.cnf –user=mysql > /tmp/mysql_star.log 2>&1 &
/home/mysql/mysql/bin/mysqld –defaults-file=/home/mysql/my3313.cnf –initialize –user=mysql –basedir=/home/mysql/mysql –datadir=/home/mysql/my3313/data
/home/mysql/mysql/bin/mysqld_safe –defaults-file=/home/mysql/my3313.cnf –user=mysql > /tmp/mysql_star.log 2>&1 &
— percona 单机多实例 运行
主从搭建:
主库
reset master;
reset slave;
grant replication slave,reload on *.* to "slave"@"10.50.61.21" identified by "fhSU6ayL";
flush privileges;
show master status;
从库:
stop slave;
reset master;
reset slave;
change master to master_host="10.50.61.21",master_user="slave",master_password="fhSU6ayL",master_port=3310,master_log_file="binlog.000001",master_log_pos=608;
start slave;
show slave status/G;
到此,相信大家对“怎么安装percona server 5.7”有了更深的了解,不妨来实际操作一番吧!这里是亿速云网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!
原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/202286.html