Polaron effects on the optical rectification (OR) and the second harmonic generation (SHG) in cylindrical quantum dots (CQDs) with the radial parabolic potential and the z-direction linear potential in the presence of the magnetic field are theoretically investigated. The expressions for both the OR and the SHG are obtained within the framework of the compact-density-matrix approach and the iterative method. After considering the electron-LO-phonon interaction (ELOPI) as perturbation, the energy levels and the wave functions of an electron confined in CQD are obtained by perturbation theory. Numerical calculations are presented for GaAs/AlGaAs. It is found that when we consider the ELOPI, the resonant peak of the OR chi((2))(0) is enhanced, whereas the magnitude of the SHG vertical bar chi((2))(2 omega)vertical bar is greatly enhanced. It is also found that when we ignore the ELOPI, with the increase of the radial confinement frequency omega(rho) and the magnetic field B, respectively, the resonant peak of the chi((2))(0) remains constant, whereas the magnitude of the SHG vertical bar chi((2))(2 omega)vertical bar becomes small. However, when we consider the ELOPI, with the increase of omega(rho), B and V respectively, both the resonant peak of the OR chi((2))(0) and the magnitude of the SHG vertical bar chi((2))(2 omega)vertical bar become small. Our results also find that whether the ELOPI is considered or not, with the increase of omega(rho), B and V, respectively, both chi((2))(0) and vertical bar chi((2))(2 omega)vertical bar exhibit a blue shift. (C) 2012 Elsevier Ltd. All rights reserved.