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 8980881
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:11:47+00:00 2026-06-15T20:11:47+00:00

Having recently reformatted my hard-drive, I cannot get my local Java/Tomcat/MySQL stack working. This

  • 0

Having recently reformatted my hard-drive, I cannot get my local Java/Tomcat/MySQL stack working.

This is a clean MySQL install, running on Mac OSX 10.7.3 (Lion).

The error I’m getting is when my tomcat instance starts up and tries to connect is:

SEVERE: Servlet /concorde-web threw load() exception
java.sql.SQLException: Access denied for user 'concorde'@'localhost' (using password: YES)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)

Steps taken:

  • I’ve set concorde@localhost‘s password as described here and here
  • I can connect from the console using the same credentials. All of the following work:

    mysql -u concorde -h localhost -p
    mysql -u concorde -p
    mysql -u concorde -h localhost -D concorde -p
    // the app is trying to connect as user concorde to db concorde
    
  • I’ve ensured that the concorde user has rights – not just from localhost, but anywhere:

    GRANT ALL ON concorde.* TO 'concorde'@'%';
    FLUSH PRIVELEDGES;
    

What am I missing?

Beyond that, what steps can I take to work out what’s going on here? Are there any logs I can check?

EDIT

As requested, here’s the code I’m using.

However, this code worked fine before reformatting my hard-drive, so I’m doubtful that the problem lies within it.

The app is running in a spring container, and it’s during Spring’s startup that things are faling over.

Here are the relevant bean declarations:

<bean id="entityManagerFactory"
    class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
    <property name="dataSource" ref="dataSource" />
    <property name="persistenceUnitName" value="spring-jpa" />
    <property name="jpaVendorAdapter">
        <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
            <property name="showSql" value="true" />
            <property name="generateDdl" value="false" />
            <property name="databasePlatform" value="org.hibernate.dialect.MySQLDialect" />
        </bean>
    </property>
</bean>


<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
    <property name="driverClassName" value="com.mysql.jdbc.Driver" />
    <property name="url"
        value="jdbc:mysql://${database.host}:${database.port}/${database.name}" />
    <property name="username" value="${database.username}" />
    <property name="password" value="${database.password}" />
    <property name="initialSize" value="5" />
    <property name="maxActive" value="50" />
</bean>

And, here are the defined properties:

hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
database.name=concorde
database.username=concorde
database.password=password  
database.host=localhost
database.port=3306

Additionally here is the (abridged) output of a query on the permissions:

mysql> select * from information_schema.user_privileges;

| 'concorde'@'localhost'                 | def           | USAGE                   | NO           |
| ''@'localhost'                         | def           | USAGE                   | NO           |
| ''@'Marty-Pitts-MacBook-Pro.local'     | def           | USAGE                   | NO           |
| 'concorde'@'%'                         | def           | USAGE                   | NO           |
+----------------------------------------+---------------+-------------------------+--------------+

Note – this was run by logging on with root.

I suspect there’s a clue in the NO shown there for my user, but I’m not sure how to interpret that data.

mysql> select * from information_schema.SCHEMA_PRIVILEGES;
+------------------------+---------------+--------------+-------------------------+--------------+
| GRANTEE                | TABLE_CATALOG | TABLE_SCHEMA | PRIVILEGE_TYPE          | IS_GRANTABLE |
+------------------------+---------------+--------------+-------------------------+--------------+
| 'concorde'@'localhost' | def           | concorde     | SELECT                  | YES          |
| 'concorde'@'localhost' | def           | concorde     | INSERT                  | YES          |
| 'concorde'@'localhost' | def           | concorde     | UPDATE                  | YES          |
| 'concorde'@'localhost' | def           | concorde     | DELETE                  | YES          |
| 'concorde'@'localhost' | def           | concorde     | CREATE                  | YES          |
| 'concorde'@'localhost' | def           | concorde     | DROP                    | YES          |
| 'concorde'@'localhost' | def           | concorde     | REFERENCES              | YES          |
| 'concorde'@'localhost' | def           | concorde     | INDEX                   | YES          |
| 'concorde'@'localhost' | def           | concorde     | ALTER                   | YES          |
| 'concorde'@'localhost' | def           | concorde     | CREATE TEMPORARY TABLES | YES          |
| 'concorde'@'localhost' | def           | concorde     | LOCK TABLES             | YES          |
| 'concorde'@'localhost' | def           | concorde     | EXECUTE                 | YES          |
| 'concorde'@'localhost' | def           | concorde     | CREATE VIEW             | YES          |
| 'concorde'@'localhost' | def           | concorde     | SHOW VIEW               | YES          |
| 'concorde'@'localhost' | def           | concorde     | CREATE ROUTINE          | YES          |
| 'concorde'@'localhost' | def           | concorde     | ALTER ROUTINE           | YES          |
| 'concorde'@'localhost' | def           | concorde     | EVENT                   | YES          |
| 'concorde'@'localhost' | def           | concorde     | TRIGGER                 | YES          |
| 'concorde'@'%'         | def           | concorde     | SELECT                  | NO           |
| 'concorde'@'%'         | def           | concorde     | INSERT                  | NO           |
| 'concorde'@'%'         | def           | concorde     | UPDATE                  | NO           |
| 'concorde'@'%'         | def           | concorde     | DELETE                  | NO           |
| 'concorde'@'%'         | def           | concorde     | CREATE                  | NO           |
| 'concorde'@'%'         | def           | concorde     | DROP                    | NO           |
| 'concorde'@'%'         | def           | concorde     | REFERENCES              | NO           |
| 'concorde'@'%'         | def           | concorde     | INDEX                   | NO           |
| 'concorde'@'%'         | def           | concorde     | ALTER                   | NO           |
| 'concorde'@'%'         | def           | concorde     | CREATE TEMPORARY TABLES | NO           |
| 'concorde'@'%'         | def           | concorde     | LOCK TABLES             | NO           |
| 'concorde'@'%'         | def           | concorde     | EXECUTE                 | NO           |
| 'concorde'@'%'         | def           | concorde     | CREATE VIEW             | NO           |
| 'concorde'@'%'         | def           | concorde     | SHOW VIEW               | NO           |
| 'concorde'@'%'         | def           | concorde     | CREATE ROUTINE          | NO           |
| 'concorde'@'%'         | def           | concorde     | ALTER ROUTINE           | NO           |
| 'concorde'@'%'         | def           | concorde     | EVENT                   | NO           |
| 'concorde'@'%'         | def           | concorde     | TRIGGER                 | NO           |
  • 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-06-15T20:11:48+00:00Added an answer on June 15, 2026 at 8:11 pm

    Somewhat embarrasingly, the answer turned out to be that the password is being read in from an external file.

    Someone else checked out the file, and when committing it, some trailing whitespace characters got appended to the password. It seems that these aren’t trimmed when spring reads the property file (reasonable, I guess).

    However, this is what was causing the issue. A genuine wrong password.

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

Sidebar

Related Questions

I’m relatively new to working with Scala having recently come from a java background.
I recently asked about functional programs having no side effects, and learned what this
Having recently discovered this method of development, I'm finding it a rather nice methodology.
I hope this helps explain the issue I am having I have recently designed
I am recently having this strange issue in my Visual Studio 2008 professional. Whenever
Having recently begun working on a project which might need (good) scaling possibilities, I've
Having recently developed an interest in NodeJS, I finally managed to get my hands
I have recently started having a need to start learning Java Script. My application
Ok SO recently I've being having a lot of trouble with an application working
I don't know much about this, just having recently started with JavaScript, so simple

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.