最新消息:

常用msyql 语句

SQL 老鹰 345浏览 0评论

mysql version: 5.5.X

server-id=24983306 # ip后两位加端口来做 长度为4位整数
relay-log=mysql-relay-bin
replicate_do_table=yourschema.cmm_user
replicate-wild-ignore-table=mysql.%
replicate-wild-ignore-table=test.%
replicate-wild-ignore-table=information_schema.%
replicate-wild-ignore-table=performance_schema.%

create database linxunvic DEFAULT CHARACTER SET UTF8 COLLATE utf8_general_ci;

grant all privileges on linxunvic.* to vicclub@’%’ identified by ‘0xunclub';
flush privileges;

mysqldump -uroot –lock-tables –skip-triggers –flush-logs –master-data=2 –databases yourdbscheam –tables [yourtable1 yourtable2] > 5_linxunvic_2_tables.sql

grep -i “change master” 5_linxunvic_2_tables.sql

— CHANGE MASTER TO MASTER_LOG_FILE=’mysql-bin.000006′, MASTER_LOG_POS=106;

grant replication slave on *.* to ‘yourusername’@’192.168.11.41′ identified by ‘yourpassword';

start slave;
show slave status\G

附上mysqldump (mysql 5.5.19)参数大全地址:
http://www.cnblogs.com/qq78292959/p/3637135.html
mysql binary install tip:
http://dev.mysql.com/doc/refman/5.5/en/binary-installation.html

转载请注明:冯英胜的博客 » 常用msyql 语句

发表我的评论
取消评论
表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址