The question is worded somewhat vaguely, so it's not quite clear what's being asked. I will first answer the second question, "Has there ever been in action in a democracy by the government that the military meaningfully opposed?"
On one hand, it's a deep question in political science, since the whole concept of a sovereign government if something which holds a monopoly on the use of force. Or, as notable political scientist Mao Zedong put it:
"Political power grows out of the barrel of a gun"
In practice, at a high level, it is hard, if not impossible, to find a historical example of an action in a democracy by the government that the whole military meaningfully opposed.
One problem with finding this in history is that most functional modern democracies have civilian control over the military - meaning that, if the military opposes this, it becomes anti-government coup and the country is no longer a functioning democracy as a result. An imperfect example of this is Egypt, where putatively democratically elected Muslim Brotherhood government was opposed by the Egyptian military, resulting in Al-Sisi taking over the government.
In practice, it's frequent that some parts of the military support and some oppose something; for example during GKChP Putsch in Moscow, the central USSR brass supported (well, started) the coup while many armed forces in Moscow chose to either side with Yeltsin and the protesters; or not take sides - thus, allowing the chance for the Putsch to fail. Going further back in time, during 1917 revolution, when Russia was arguably a kind-of-constitutional-democratic-monarchy (under Kerensky), during the events of 1917 revolution, a large portion of the Army's rank and file defied the Army's command and the democratic government and sided with Bolsheviks, allowing the latter to win.
However, the 1991 Putsch was followed in 1993 by the Russian_constitutional crisis, where the Army took sides between President Yeltsin and the Parlament (Supreme Soviet); resulting in arguably undemocratic outcome; but at the beginning it was a constitutional crisis between executive and legislative branches of a democracy.
Now, answering your first question/statement.
Democracy is when the majority of military force in a society take an action - OP
No, sorry, your understanding of what a democracy is is incorrect.
Democracy is a generally very vague term, but it overall means "rule of the people". This is the direct opposite of "the majority of military force in a society take an action", which is basically military junta, or more often a dictatorship by military officers.
Leaving aside theoretical political science concepts, please note two things which make it the opposite of democracy:
Military usually constitutes a minority - often, a VERY small minority - of a country's population, especially in modern democracies with volunteer professional armies.
Military itself is NOT a democracy, soldiers don't take votes (as a rule - though there are some rare exceptions); and the military does what a very very small set of high level officers order them to do.