Do not hit the Marlix. Hitting the Marlix will enrage it and make it unable to tame. Instead, politely walk up to it with shiny flesh in your hand. Marlixes love shiny flesh and if they see you holding it they would not attack you for 1.5 seconds, giving you the perfect window of opportunity to tame it. Right click the Marlix with the shiny flesh and he will protect you from any mob that attacks you or any mob you attack. They can also attack griefers (they attack when someone breaks a block that you placed).