Mysql
Multi-instance
1.my.cnf
By defining Mysqldconfig class Mysqld_vars = {} Get a lot of configuration file related parameter write dictionary from inside
mysql.py
2.init DB
Initializing the database
3. Modify Permissions
4.rc Script Startup
5.check Check the configuration file, the configuration file is synchronized with the MySQL variable
6. The value is actually the same, do not let the display
7.Popen Call MYSQL-E command
Sql
Io
seconds_behind_master:0 Look at this threshold, greater than two seconds
8.mysql Master-Slave
Master configuration file:
Bin-log
Server-id
Create Grant Replication permissions
From the configuration file:
Server-id
Master-host
Master-user
Master-port
"" can be wrapped
"" "Can not
./mymantea.py-c Backup-n Master01
./mymantea.py-n slave15-p 3315-c restore 192.168.1.14 3306/var/mysqlmanager/backup/master01/2014-05-10.02.11.21. Sql
./mymantea.py-n slave06-c Create slave 7 192.168.1.16 3306-p 3312
./myman.py-c Create master 1-p 3306-n Master01
./mymantea.py-n slave15-c Start-p 3315
Mysql> show global variables like ' server_id ';
Mysql> show global variables like ' log_bin% ';
Mysql> select User,host,password from Mysql.user;
This article is from the "Muzinan Technology blog" blog, make sure to keep this source http://muzinan110.blog.51cto.com/684213/1437987