标签:
0.常用命令
1
2
3
4
5
6
7
8
|
删除表中所有数据 truncate 表名; reset master; 清除所有的bin-log日志 show master status; 查看授权用户 show grants for user1@192.168.10.2; 重启Mysql pkill mysqld |
1
2
|
grant all on *.* to ‘user1‘ @192.168.10.2 identified by ‘pass‘ ; select user,host,password from mysql.user; |
1
2
3
|
change master to master_host= ‘192.168.10.1‘ , master_user= ‘slave‘ , master_password= ‘test.com‘ , master_log_file= ‘mysql-bin.000007‘ , master_log_pos=334; start slave; show slave status\G |
1
|
/usr/local/mysql/bin/mysqldump -uroot -p123 test -l -F ‘/tmp/test.sql‘ |
1
|
/usr/local/mysql/bin/mysqlbinlog --no-defaults mysql-bin.000002 | /usr/local/mysql/bin/mysql -uroot -p123 test |
1
|
/usr/local/mysql/bin/mysql -uroot -p123 test < /tmp/test .sql |
标签:
原文地址:http://www.cnblogs.com/stevendes/p/4332338.html