surrogate icon indicating copy to clipboard operation
surrogate copied to clipboard

Can't get mysqld_multi working

Open isoinh opened this issue 7 years ago • 4 comments

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?

isoinh avatar Mar 02 '17 08:03 isoinh

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

isoinh avatar Mar 02 '17 08:03 isoinh

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?

isoinh avatar Mar 02 '17 10:03 isoinh

Hey @isoinh, i just got the same problem and nothing help, still don't know how to use it with mysqld_multi instances.

Lwbcr7 avatar Apr 24 '18 04:04 Lwbcr7

@Lwbcr7, I gave up on this. Got it partially working but if I remember correctly other parts, such as restoring the database failed.

isoinh avatar Apr 24 '18 08:04 isoinh