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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:54:25+00:00 2026-06-15T02:54:25+00:00

I have a servlet application running on Tomcat 7 and wish to connect to

  • 0

I have a servlet application running on Tomcat 7 and wish to connect to MySQL locally.

My local MySQL user does not have a password, and I wish to keep it that way for convenience.

However, if I do not use the password attribute under Resource in context.xml, it tries to connect to the DB without the username even though I have set it.

How can I connect without a password?

Below is my context.xml file, if it matters.

<?xml version="1.0" encoding="UTF-8"?>
<Context>
    <Resource
        name="jdbc/mysql"
        auth="Container"
        type="javax.sql.DataSource"
        maxActive="100"
        maxIdle="30"
        maxWait="10000"
        username="whirlwin"
        password="removeMe"
        driverClassName="com.mysql.jdbc.Driver"
        url="jdbc:mysql://localhost:3306/theDB?autoReconnect=true"/>
</Context>
  • 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-15T02:54:27+00:00Added an answer on June 15, 2026 at 2:54 am

    Have you tried leaving empty string for the password?

    If this doesn’t help, post what you get running mysql -uwhirlwin -hlocalhost from the command line.

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

Sidebar

Related Questions

I have a simple tomcat servlet application, no Java EE. Also, I am running
I have a Java servlet application running within Tomcat, there is one admin command
I have to connect to server(servlet on tomcat) always running and process the http
I have created a JSP / servlets application running in Tomcat 7. It runs
I have two web applications running in same Servlet container ( Tomcat ), A
I have a web application running in Tomcat 7. When I place the tomcat
I have a Java web application running on Tomcat. I want to load static
I have a web application running on Tomcat 6 and a Java-programmed client application.
I have a simple servlet running in Tomcat. Because the servlet connects to a
I have a Spring 2.5.6 MVC application that I'm running on Tomcat 7. However,

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.