In this paper, by combining Heck-Li-Wang's theorem in three dimensions, LaiUhlmann-Wang's theorem as well as Imanuvilov-Yamamoto's theorem in two dimensions with our new conclusion (in any dimension), we give an answer to an open problem that asks whether one can determine the viscosity function for the Stokes equations and for the Navier-Stokes equations by boundary measurements on an arbitrary bounded domain in R-n, (n = 2, 3). More precisely, we show the global uniqueness for the inverse boundary value problems associated with the Stokes equations in three-dimensional bounded domain as well as in two-dimensional simple-connected bounded domain, with the Navier-Stokes equations in two- or three-dimensional bounded domain.