You can't restrict GRANT REPLICATION SLAVE
to only one database, so you must use
GRANT REPLICATION SLAVE ON *.* TO 'user'@'host'
But you can restrict the replication itself :
- put the following command in your configuration file (my.ini) on the
master slave:
EDIT :
As the latter is rather for the slave server, it can easily be messed up with. So you'll want to do it on the master server, using either :
[mysqld]
for the databases that you want to replicate
OR
for the databases that you don't want to be replicated
- For both commands : to specify more than one database, use this
option multiple times.
Warning:
Excluding databases on the server using the last two commands, has the effect that no statement about them will be included in the binary log file which will compromise the backup procedure.