This is the place for newbies, so here goes.
I have two existing mySQL databases I would like to replicate. The databases already exist on both servers as kind of LAMP appliances, (Bitnami/WordPress)
I followed the instructions here (http://dev.mysql.com/doc/refman/5.0/en/replication-howto.html) but when I try to pull down the dump file from the master to the slave using mysql -h master < dbdump.db I get:
bash: dbdump.db: No such file or directory
I set the Replication Master Config:
[mysqld]
log-bin=mysql-bin
server-id=1
I set the Replication Slave Config:
[mysqld]
server-id=2
I created a user for replication:
mysql> CREATE USER 'repl'@'%.mydomain.com' IDENTIFIED BY 'slavepass';
mysql> GRANT REPLICATION SLAVE ON *.* TO 'repl'@'%.mydomain.com';
I obtained the Master Binary Log Coordinates:
+------------------+----------+--------------+------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+----------+--------------+------------------+
| mysql-bin.000001 | 106 | | |
+------------------+----------+--------------+------------------+
Created a data snapshot with mysqldump
mysqldump -uroot -p<password> --databases bitnami_wordpress --lock-all-tables --master-data >dbdump.db
I set the Master configuration on the Slave:
mysql> CHANGE MASTER TO
-> MASTER_HOST='<IP ADDRESS OF MASTER1',
-> MASTER_USER='repl',
-> MASTER_PASSWORD='<repl password>',
-> MASTER_LOG_FILE='mysql-bin.000001',
-> MASTER_LOG_POS=106;
Yet on the slave when I try to conduct shell> mysql -h master < fulldb.dump I get the following error: bash: dbdump.db: No such file or directory
Is the dbdump.db in the wrong directory? Is the syntax of the mysql statement I'm using to import the dump into the slave database incorrect? I feel like I'm *this* close to getting it and it's a total newbie error.
Kind regards to whoever can point me in the right direction.
JJJ
I have two existing mySQL databases I would like to replicate. The databases already exist on both servers as kind of LAMP appliances, (Bitnami/WordPress)
I followed the instructions here (http://dev.mysql.com/doc/refman/5.0/en/replication-howto.html) but when I try to pull down the dump file from the master to the slave using mysql -h master < dbdump.db I get:
bash: dbdump.db: No such file or directory
I set the Replication Master Config:
[mysqld]
log-bin=mysql-bin
server-id=1
I set the Replication Slave Config:
[mysqld]
server-id=2
I created a user for replication:
mysql> CREATE USER 'repl'@'%.mydomain.com' IDENTIFIED BY 'slavepass';
mysql> GRANT REPLICATION SLAVE ON *.* TO 'repl'@'%.mydomain.com';
I obtained the Master Binary Log Coordinates:
+------------------+----------+--------------+------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+----------+--------------+------------------+
| mysql-bin.000001 | 106 | | |
+------------------+----------+--------------+------------------+
Created a data snapshot with mysqldump
mysqldump -uroot -p<password> --databases bitnami_wordpress --lock-all-tables --master-data >dbdump.db
I set the Master configuration on the Slave:
mysql> CHANGE MASTER TO
-> MASTER_HOST='<IP ADDRESS OF MASTER1',
-> MASTER_USER='repl',
-> MASTER_PASSWORD='<repl password>',
-> MASTER_LOG_FILE='mysql-bin.000001',
-> MASTER_LOG_POS=106;
Yet on the slave when I try to conduct shell> mysql -h master < fulldb.dump I get the following error: bash: dbdump.db: No such file or directory
Is the dbdump.db in the wrong directory? Is the syntax of the mysql statement I'm using to import the dump into the slave database incorrect? I feel like I'm *this* close to getting it and it's a total newbie error.
Kind regards to whoever can point me in the right direction.
JJJ