First, you need to Find a free Group ID. To Catch it perform:
groupmaxid=$(dscacheutil -q group | awk '{print $2}' | sort -ug | tail -1)
groupnewid=$(groupmaxid+1)
Now the Next Free ID is stored in the newid Variable and you can use it wile Adding the New Group. Then to Add your New Group you Perform:
dscl . -create /Groups/mysql gid $groupnewid