The structures of a single vortex and vortex lattice in a superconductor with dx^2y^2 symmetry are studied self-consistently employing newly derived Ginzburg-Landau equations. Near a single vortex, we found that an s-wave component of the order parameter is always induced, and it causes the local magnetic field distribution and the d-wave order parameter to have a four-fold anisotropy. The magnitude of the induced s-wave component depends on the relative strength between the on-site repulsive Coulomb interaction Vs, and the d-wave pairing interaction Vd. It is shown that there is a strong correlation between the structure of a single vortex and the shape of the vortex lattice. For moderate values of Vs/Vd our numerical calculation indicates that the structure of the vortex lattice is always oblique as long as the profile of the local magnetic field around a single vortex has a four-fold symmetry. This happens usually for temperatures well below Tc. When temperatures are very close to Tc or Vs/Vd >> 1, the local magnetic field distribution is isotropic and the vortex lattice becomes triangular. The comparison of the present result with the measurements of the vortex lattice structure using small angle neutron scattering on YBa2Cu3O7 samples will be discussed.