We develop a discrete analog of the differential calculus and use this to develop arbitrarily high-order approximations to Sturm-Liouville boundary-value problems with general mixed boundary conditions. An important feature of the method is that we obtain a discrete exact analog of the energy inequality for the continuum boundaryvalue problem. As a consequence, the discrete and continuum problems have exactly the same solvability conditions. We call such discretizations mimetic. Numerical test confirm the accuracy of the discretization. We prove the solvability and convergence for the discrete boundary-value problem modulo the invertibility of a matrix that appears in the discretization being positive definite. Numerical experiments indicate that the spectrum of this matrix is real, greater than one, and bounded above by a number smaller than three.