Mysql-tools
Mysql-tools copied to clipboard
Using replication manager with XtraDB Cluster 8.x
I am setting up your replication manager script with XtraDB Cluster 8.x, ran into an issue where the eval statement on line 131 throws an error due to the 'wsrep_monitor_status' value. I modified that line to filter this out and then things work as expected.
Here is what I used to get it going: eval `$MYSQL -N -e 'show global status;show global variables;' 2> /tmp/mysql_error | tr '\t' '=' | sed -e ':a' -e 'N' -e '$!ba' -e 's/,\n/, /g' | sed -e 's/^([^=])=(.)$/\1='"'"'\2'"'"'/g' | grep -v 'wsrep_monitor_status'`
Just letting you know so you can test it with 8.x and apply the appropriate changes to the source script.
I was getting the same issue recently on the same setup, I tried using your fix but got this complaint on the sed expression:
sed: -e expression #1, char 24: invalid reference \2 on `s' command's RHS
I used the original sed expression with your additional filter and that worked:
eval `$MYSQL -N -e 'show global status;show global variables;' 2> /tmp/mysql_error | tr '\t' '=' | sed -e ':a' -e 'N' -e '$!ba' -e 's/,\n/, /g' | sed -e 's/^\([^=]*\)=\(.*\)$/\1='"'"'\2'"'"'/g' | grep -v 'wsrep_monitor_status'`