surrogate
surrogate copied to clipboard
Can't get mysqld_multi working
Hi,
How should i configure surrogate to get the mysqld_multi working?
My MySQL includes test and production environment. Production:
- running in port 3306
- datadir=/data/production
- socket=/data/production/mysql.sock
Test:
- running in port 3307
- datadir=/data/test
- socket=/data/test/mysql.sock
If I have surrogate.conf with these options:
- mysql_instances="3306 3307"
- mysql_socket_3306=/data/production/mysql.sock
- mysql_socket_3307=/data/test/mysql.sock
- mysql_data_path="/data/"
- mysql_log_path="/data/log"
- backup_directory="/data/backups"
- mysql_collapse_path="/data/backups/tmp"
At first I will get error: /usr/local/bin/surrogate -b full Processing instance: 3306 REBUILDING CONFIGS FOR 3306 tail: cannot open `/data/backups/3306/.digest' for reading: No such file or directory
After I created .digest files in 3306 and 3307 directories I get this error: /usr/local/bin/surrogate -b full Processing instance: 3306 REBUILDING CONFIGS FOR 3306 /usr/local/lib/surrogate/lib/actions/full: line 6: socket: unbound variable
What I'm doing wrong here?
Hummm... it seems to work after I removed the set -u from: /usr/local/lib/surrogate/lib/actions/restore /usr/local/lib/surrogate/lib/rotate /usr/local/lib/surrogate/surrogate /usr/local/lib/surrogate
Ok. Got the mysql_instances="3306 3307" changed to mysql_instances="production test" and changed socket configuration accordingly. This change did not affect the set -u problem and now after restore /data/production and /data/test directories are empty before starting up mysql. Do I still have something wrong?
Hey @isoinh, i just got the same problem and nothing help, still don't know how to use it with mysqld_multi instances.
@Lwbcr7, I gave up on this. Got it partially working but if I remember correctly other parts, such as restoring the database failed.