PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, March 17, 2022

[FIXED] How to find server id with MAMP

 March 17, 2022     mamp, mysql     No comments   

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
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

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

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing