I routinely mine ore, coal etc out of sandstone aquifers. I've never encountered flux in an aquifer though.
It's going to depend somewhat on the layout of the aquifer. Where is the flux in the aquifer? If it's on the top of the aquifer, just mining out the dry core is easy enough, but I'll assume it's sandwiched between aquifer layers so you get the "leaky ceiling problem", but have infinite drainage below.
Basically you need to exploit the fact, that when falling water hits 7/7 water, it tries to teleport to a place where it fits. An aquifer is considered an infinite empty space for the purpose of teleporting water, so if you have a pond in an aquifer, any water falling into that pond will simply disappear from existence, you could say it's "absorbed" into the aquifer, but in truth it instantly vanishes. This allows you to efficiently drain the water from higher aquifer layers.
So. You need to mine out columns of up/down stairs, which go from below the flux layer, to a dry layer above (to eliminate "leaky ceilings"). Any water which comes out of the aquifer walls, falls into the bottom pond, and disappears from existence. Up/down stairs are good because they function as mining for the purpose of extracting stones, allow access above and below, and allow water to fall through. You should make a large block of these columns - always columns of up/down stairs reaching from the dry layer to the aquifer layer below the ore layer - it wont work well if you don't keep the sides of the mined out area vertical because you'll have water falling and flowing all over the place.
Once you've mined out everything you want, you need to seal the walls of the aquifer so you don't have ongoing leakage. Starting from the top down, build constructed walls to seal the walls of the aquifer, or you can smooth stone aquifer.
Do note that if you're going to do this, you want to think big. It's relatively less work to dig out a lot than a little. For example if you dig out a 4x4 area, you get 16 stones, and require 16 stones to seal the four walls (a 1:1 ratio). But if you dig out a 20x20 area, you get 400 stones, and require 80 stones to seal the four walls (a 5:1 ratio).
Hopefully this is somewhat helpful.