MySQL常用命令
来源:互联网 发布:c语言创建多个进程 编辑:程序博客网 时间:2024/06/07 00:34
--赋权所有IP均可以登录
grant all privileges on *.* to 'root'@'%' identified by 'root' with grant option;
--创建用户
create user repl;
--切换数据库为mysql
use mysql;
--修改密码
set password for repl=password('repl');
update user set password=password("repl") where user='repl';
--刷新权限
flush privileges;
--赋权限REPLICATION SLAVE权限
grant replication slave on *.* to 'repl'@'%' identified by 'repl';
--查看master状态
show master status;
--连接Master
change master to master_host='192.168.0.104', //Master 服务器Ip
master_port=3306,
master_user='repl',
master_password='mysql',
master_log_file='master-bin.000001',//Master服务器产生的日志
master_log_pos=0;
--启动Slave
start slave;
grant all privileges on *.* to 'root'@'%' identified by 'root' with grant option;
--创建用户
create user repl;
--切换数据库为mysql
use mysql;
--修改密码
set password for repl=password('repl');
update user set password=password("repl") where user='repl';
--刷新权限
flush privileges;
--赋权限REPLICATION SLAVE权限
grant replication slave on *.* to 'repl'@'%' identified by 'repl';
--查看master状态
show master status;
--连接Master
change master to master_host='192.168.0.104', //Master 服务器Ip
master_port=3306,
master_user='repl',
master_password='mysql',
master_log_file='master-bin.000001',//Master服务器产生的日志
master_log_pos=0;
--启动Slave
start slave;
0 0
- MySQL常用命令
- MySql常用命令
- MySQL常用命令
- mysql常用命令
- mysql常用命令
- mysql常用命令
- Mysql常用命令
- MySQL常用命令
- mysql 常用命令
- MySQL常用命令
- mysql常用命令
- MySql常用命令
- MySQL常用命令
- mysql 常用命令
- mysql常用命令
- mysql常用命令
- mysql 常用命令
- MySQL常用命令
- Python简单操作读写Excel
- SAP 限制出货数量小于销售订单数量
- Spring MVC 之@Controller@RequestMapping详解
- 实战 TestNG 监听器
- NBOJv2 1004 蛤玮打扫教室(线段树区间更新区间最值查询)
- MySQL常用命令
- POJ1577
- Mutable and Immutable Collections的区别
- Flip Game
- <JAVA与模式>之组合模式
- 关于对Java Struts2+poi插件 实现的 导出Excel功能
- SpringMVC拦截器教程(亲测有用)
- android项目工程下各文件夹的含义
- 118. Pascal's Triangle