Content added Content deleted
imported>Hundfred (New page: == mysql-master-slave-replication == 1)on the master and the slave a new "replication" user has to be added <pre> mysql> create user repuser@kurs007 identified by 'xxxxx'; Query OK, 0 r...) |
imported>Hundfred No edit summary |
||
Line 1: | Line 1: | ||
== mysql-master-slave-replication == |
== mysql-master-slave-replication == |
||
Line 11: | Line 10: | ||
mysql> create user repuser@kurs007 identified by 'xxxxx'; |
mysql> create user repuser@kurs007 identified by 'xxxxx'; |
||
Query OK, 0 rows affected (0.00 sec) |
Query OK, 0 rows affected (0.00 sec) |
||
</pre> |
|||
now we have to edit the my.ini on the master and the slave |
|||
'''master:''' |
|||
<pre> |
|||
server_id=1 |
|||
</pre> |
|||
(there are loads of options, it is also possible to encrypt the connection with ssl.) |
|||
'''slave:''' |
|||
<pre> |
|||
server-id=2 |
|||
master-host=<ip_address or fqdn> |
|||
master-port=3306 |
|||
master-user=repuer #username |
|||
master-passwort=xxxxx #can be given here, or later, if mysqld is started |
|||
master-connect-retry=60 #in seconds |
|||
</pre> |
</pre> |
Revision as of 07:49, 24 June 2009
mysql-master-slave-replication
1)on the master and the slave a new "replication" user has to be added
mysql> create user repuser@kurs007 identified by 'xxxxx'; Query OK, 0 rows affected (0.00 sec)
2) set some rights
mysql> create user repuser@kurs007 identified by 'xxxxx'; Query OK, 0 rows affected (0.00 sec)
now we have to edit the my.ini on the master and the slave
master:
server_id=1
(there are loads of options, it is also possible to encrypt the connection with ssl.)
slave:
server-id=2 master-host=<ip_address or fqdn> master-port=3306 master-user=repuer #username master-passwort=xxxxx #can be given here, or later, if mysqld is started master-connect-retry=60 #in seconds