Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old July 27th, 2002, 08:59 PM
brian411 brian411 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 0 brian411 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old July 28th, 2002, 01:21 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,686 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 2 Weeks 5 Days 16 h 27 m 51 sec
Reputation Power: 259
It's a problem of user rights in MySQL
Quote:
Access denied for user: 'test@192.168.1.1' (Using password: YES)

See http://www.devshed.com/Server_Side/...cess/page1.html

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > Access denied to mySQL database


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway