0

I setup MySQL master slave replication, but none of the databases, tables, and data is being copied over to the slave from the master.

Here is the relevant configuration on the master:

server-id=1
log-bin=mysql-bin
sync_binlog=1
expire_logs_days=7

And here is the relevant slave configuration:

server-id=2
relay-log=mysqld-relay-bin
report-host=myhost.domain.com

I am assuming I don't need to manually import all the data into the slave, I assume, the master automatically syncs the information correct?

Justin
  • 5,328
  • 19
  • 64
  • 84

2 Answers2

4

No, your assuming is wrong. You must take a data snapshot and configure the slave with the replication coordinates from the master. Take a look at this for more details.

quanta
  • 51,413
  • 19
  • 159
  • 217
1

You need to create a snapshot of the data and import that in to your slave before you start the replication slave. Typically that is done with mysqldump.

On you master check "show Master status", and on your slave check "show slave status".

That will give you any errors.

And follow what quanta link you to.

Squidly
  • 1,765
  • 1
  • 14
  • 18
  • Do I include the `mysql` and `information_schema` databases in the dump?` – Justin Oct 28 '11 at 00:55
  • It depends if you want to replica them. On the systems I setup I didn't choose to replicate mysql and information_schema. – Squidly Oct 28 '11 at 00:58