Thursday, March 17, 2022

[FIXED] How to find server id with MAMP

Issue

MySQL manual holds that the function UUID_SHORT() is guaranteed to be unique if the following conditions hold (list not extensive):

  1. The server_id of the current host is unique among your set of master and slave servers

  2. server_id is between 0 and 255

I'm using UUID_SHORT() on several MAMP servers.

How do I set, or where can I see server_id value with MAMP?

Thanks!


Solution

You can view system variables with SHOW VARIABLES:

SHOW VARIABLES LIKE "server_id";

Since, server_id is dynamic, you can set the variable with SET:

SET GLOBAL server_id=1


Answered By - Marcus Adams

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.