?
Solved

Connecting to a MYSql Database

Posted on 2005-03-22
7
Medium Priority
?
197 Views
Last Modified: 2008-01-09
This is my code:

Connection conn = DriverManager.getConnection("jdbc:mysql://localhost/coinzilla?user=administrator&password=password");

This is the error i get:

Access denied for user ''@'miller.virtual.vps-host.net' to database 'coinzilla' 42000 1044

I have doubled checked the username and password multiple times. Is there anything else that could be causing the error?
0
Comment
Question by:MistahMilla
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 92

Expert Comment

by:objects
ID: 13608510
try:

Connection conn = DriverManager.getConnection("jdbc:mysql://localhost/coinzilla", "administrator", "password");
0
 
LVL 1

Author Comment

by:MistahMilla
ID: 13608545
Tried that just now... almost the same error.

Access denied for user 'administrator'@'miller.virtual.vps-host.net' (using password: YES) 28000 1045

Just the numbers at the end are different.
0
 
LVL 92

Expert Comment

by:objects
ID: 13608568
> Just the numbers at the end are different.

No the user is also different, and also the password is now being used.
Check that that user has access to the database.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:MistahMilla
ID: 13608615
I'm pretty sure that it does have access to the database.

http://miller.virtual.vps-host.net/priv.jpg
0
 
LVL 92

Accepted Solution

by:
objects earned 1000 total points
ID: 13608689
thats administrator@localhost, not administrator@miller.virtual.vps-host.net
0
 
LVL 1

Author Comment

by:MistahMilla
ID: 13608704
Thanks... i'm a moron
0
 
LVL 92

Expert Comment

by:objects
ID: 13608715
don't be so hard on yourself :)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An introduction to the wonderful sport of Scam Baiting.  Learn how to help fight scammers by beating them at their own game. This great pass time helps the world, while providing an endless source of entertainment. Enjoy!
In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month14 days, 11 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question