Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7043255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:16:01+00:00 2026-05-28T02:16:01+00:00

My local machine is running Ubuntu 11.10. I use Eclipse Indigo as my IDE.

  • 0
  • My local machine is running Ubuntu 11.10. I use Eclipse Indigo as my IDE.
  • My server is a BitNami LampStack (Ubuntu 10) running on Amazon EC2.
  • I am relatively experienced in both .Net and Java, but a beginner in JDBC, MySQL Administration, Linux, and EC2.

I have successfully opened port 3306, and MySQL Workbench can connect correctly. User ‘root’@’%’ has full privileges to everything, and no default database.

After struggling with a no-suitable-driver-found issue, I finally just put the mysql-connector-java-5.0.8-bin.jar directly in my Java Project. I realize this is probably sub-optimal, but it seems to work. I did it (after much Googling) because I can’t figure out how to install it correctly on Ubuntu, and am worried it will be harder through ssh to EC2, so I figured it could just compile into the project. A link would be appreciated, as it would be nice to fix that also.

The following is the code that throws the Exception. This is at the top of main; nothing executes first.

I have tried this with and without the Class.forName(…) and also using a java.util.Properties for the credentials. Identical credentials work from MySQL Workbench on same machine, which I have copy+pasted several times to ensure no typos.

I altered the passwords and addresses for the sake of security, though keeping the format. To be explicit, the password here is “Abcdef1234#”. For all I know, the # may be the culprit.

Class.forName("com.mysql.jdbc.Driver");
String CONNECTION_STRING = "jdbc:mysql://ec2-87-212-16-34.compute-1.amazonaws.com?user=root&password=Abcdef1234#";
Connection cn = DriverManager.getConnection(CONNECTION_STRING);

Which then throws:

Exception in thread "main" java.sql.SQLException: Access denied for user 'root'@'ppp-72-135-32-239.dsl.hgyuct.swbell.net' (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:885)
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3421)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1247)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2775)
at com.mysql.jdbc.Connection.<init>(Connection.java:1555)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
at java.sql.DriverManager.getConnection(DriverManager.java:620)
at java.sql.DriverManager.getConnection(DriverManager.java:222)
at Program.main(Program.java:5)

Let me know if I should include any more information.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T02:16:02+00:00Added an answer on May 28, 2026 at 2:16 am

    The problem was that the 'root'@'localhost' password was different than the 'root'@'%' password, so connecting from JDBC used what I thought was the old password.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am running a local apache server on an ubuntu machine, and i am
My local machine is running Python 2.5 and Nginx on Ubuntu 8.10, with Django
I'm running Apache2 on Ubuntu on my virtual machine (dev server). I have the
I want to test some PHP on my local machine running Windows XP Professional.
I'm using Collabnet SVN client versions 1.5 & 1.6. My local machine is running
On my local machine I am running an administrative c# service as LocalSystem called
When running an ASP.NET web application on a local development machine, e.g. http://devmachine:1234 ,
I can run the server on my local machine and connect to it on
I have Ubuntu 8.04 running on a Xen based VPS server that runs on
I have to scan a Ubuntu server (installed as a virtual machine on my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.