Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access rights in MySQL - Using Java

Status
Not open for further replies.

buckers21

Programmer
Dec 13, 2000
1
GB
Hello Anybody

My name is Richard! I have recently been learning Database programming with Java, and have developed a simple program to access a MySQL database and retrieve some data - as a test!

I have used a driver off a mate, which is known to work and I have run the program. At runtime, I get the following message:

java.sql.SQLException: Invalid Authorization Specification: Access denied for user: 'Richard@dhcp50.moveassist.com' <Using Password: YES>

Questions
=========

1. Do you know why I am getting this error?
2. What is the (@dhcp50) bit all about?
3. Do you know how I can get round this problem?


Any help would be most appreciated, as none of my friends seem to be able to answer this one. The error gives me the impression that it is an access problem, but I have never heard of the dhcp50 thingy, I did look on the net and it said that it was a protocol which issues ip addresses, but that doesn't help a great deal - I need to be able to fix this, as it is stopping me from progressing with my studies!

Best regards


Richard Buck
 
DHCP is a protocol that allows allocation of IP address on an as needed basis. Its purpose is to allow IP allocation from the SERVER rather than the client, as it has been historically done.

IGNORE THAT it has NOTHING to do with your problem!

What is the problem, and why do you have it? Either the username and password you used for mysql are invalid for the database you want to access, or dhcp50.moveassist.com is not a trusted IP address for the database(from the MYSQL standpoint). You see, dhcp50 in this case doesn't mean you are using dhcp. It is part of your third level domain name(dhcp50 is a subdomain to moveassist which is a subdomain to com). Of course, this probably means something like you have the 50th available ip allocated to dhcp, but that is meaningless for this discussion.

How do you fix it?

There is a special database called mysql. It has a special table called DB. Have your DBA make sure that the columns host, db and user are set to the proper host, db, and user for YOU. The rest of the fields should probably be set to Y to allow you to do anything. Ideally, host should probably be set to % to avoid the problems caused by ever changing dhcp address addresses.
 
Hey buckers21,

What is the driver you used that works and what did you set in Win2k-Pro to allow Java to see the driver?

I was trying to use mysql-connector-java-2.0.14 and so far been unable to get java to load a driver. I'd sure appreciate some insights.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top