You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by rk...@smxbox.com on 2006/06/26 08:15:38 UTC

When we restarted tomcat, we are getting the below error while connecting to MySql database

Hi,


When we restarted tomcat, we are getting the below error while
connecting to MySql database:


---------------------

Catalina.start: LifecycleException: Exception opening database
connection: java.sql.SQLException: Access denied for user
'root'@'localhost.localdomain' (using password: YES)

LifecycleException: Exception opening database connection:
java.sql.SQLException: Accessdenied for user
'root'@'localhost.localdomain' (using password: YES)

---------------------


Any work-around for the problem ?


Thanks in advance.


RK

Re: When we restarted tomcat, we are getting the below error while connecting to MySql database

Posted by David Smith <dn...@cornell.edu>.
Take a look at the user accounts in MySQL.  Some things to consider:

1. MySQL authenticates clients based on the host as well as username and 
password.  Login to mysql manually and run this:

use mysql ;
select user, host from user where user='root' ;

If the host column has '%' or 'localhost.localdomain', it should work.


2. Using the root account in a webapp is not recommended.

--David

rk@smxbox.com wrote:

>Hi,
>
>
>When we restarted tomcat, we are getting the below error while
>connecting to MySql database:
>
>
>---------------------
>
>Catalina.start: LifecycleException: Exception opening database
>connection: java.sql.SQLException: Access denied for user
>'root'@'localhost.localdomain' (using password: YES)
>
>LifecycleException: Exception opening database connection:
>java.sql.SQLException: Accessdenied for user
>'root'@'localhost.localdomain' (using password: YES)
>
>---------------------
>
>
>Any work-around for the problem ?
>
>
>Thanks in advance.
>
>
>RK
>
>  
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org