|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
Access denied to mySQL database
I have a newly setup mySQL database where I'm trying to get a basic connection going. However, I've tried numerous attempts changing usernames and passwords but it won't let my login via my jsp page. I can login if I launch the mysql.exe from my dos prompt.
I am getting this error when the jsp page is loaded: Driver Loaded! SQLException: Invalid authorization specification: Access denied for user: 'test@192.168.1.1' (Using password: YES) Here's a code snippet: public String connect() { try { Class.forName("org.gjt.mm.mysql.Driver").newInstance(); return "Driver Loaded!"; } catch (Exception E) { return "Unable to load driver."; } } public String select() { try { String user = "test", password = "test"; Connection C = DriverManager.getConnection("jdbc:mysql://141.154.254.162:3306/" + user + "?user=" + user + "&password=" + password ); Everything looks like it is setup correctly, If anyone has any idea how I can resolve this or aid in a step in resolving this, would be greatly appreciated!! -Brian |
|
#2
|
||||
|
||||
|
It's a problem of user rights in MySQL
Quote:
See http://www.devshed.com/Server_Side/...cess/page1.html
__________________
My blog about OpenSource Databases PDF tutorials about OSS databases, DBMonster ... Please contribute to Open Source Development, fill bug reports!!! Developer Shed eSupport Commented my.ini/my.cnf (PLEASE ADD YOUR OWN CONFIG TRICK) An introduction to database normalization Natural or Surrogate key Custom ordering for your results Correlated and uncorrelated subqueries Don't turn your outer joins into inner joins |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Java Help > Access denied to mySQL database |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|