In the above case, MySql simply applies the Pythagorean theorem: c2 = a ^ 2 + b ^ 2. In this particular case, SQRT ((42.245647 - 42.260223) ^ 2 + (-71.802521 ^ 2 - -71.800010) ^ 2) = 0.014790703.
There are actually two problems with using the MySql distance function for distance with coordinates on a sphere. (1) MySql is the dropping distance on the plane, not the sphere. (2) The result is returned in degrees, not miles. To get the true, spherical distance in miles, km, feet, etc., you need to convert your lat and long degrees into units that you want to measure by determining the radius of the line from the center of the earth for latitude (latitude) you measure.
To get the true measure is quite difficult, many people and companies have made a career out of it.
Rick
source share