Connecting to a MYSql Database

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 ''@'' 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?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


Connection conn = DriverManager.getConnection("jdbc:mysql://localhost/coinzilla", "administrator", "password");
MistahMillaAuthor Commented:
Tried that just now... almost the same error.

Access denied for user 'administrator'@'' (using password: YES) 28000 1045

Just the numbers at the end are different.
> 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.
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

MistahMillaAuthor Commented:
I'm pretty sure that it does have access to the database.
thats administrator@localhost, not

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MistahMillaAuthor Commented:
Thanks... i'm a moron
don't be so hard on yourself :)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.