标签:mysql
cd /root/soft/mysqlset global validate_password_policy=0;
set global validate_password_length=6;
alter user root@"localhost" identified by"123456";
quit
vim /etc/my.cnf
systemctl restart mysqld
启用binlog日志 做用户授权 show master status;
指定server_id 指定主数据库服务器的信息 启动slave进程
server_id=76
validate_password_policy=0
validate_password_length=6
log-bin=master73
binlog-format="mixed"
grant replication slave on . to yaya@"%" identified by "123456";
show master status;显示当前正在使用的binlog日志信息
change master to
master_host="192.168.4.62",
master_user="yaya",
master_password="123456",
master_log_file="master62.000001",
master_log_pos=154;
start slave;
reset master ;删除所有的日志文件重新生成第一个日志文件
select user,host from mysql.user where user="yaya";
update mysql.user set account_locked="Y" where user= ‘root‘ and host=‘localhost‘; flush privileges;
标签:mysql
原文地址:http://blog.51cto.com/13735155/2128218