You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by marju jalloh <ja...@yahoo.com> on 2005/12/12 12:22:30 UTC

Tomcat JDBC connection with Mysql

 I can`connect to my database with via  servlet. The connection works well in PHP but not with servlet. I have  googled but no solution.
  
  this is my error page I got
  
  java.sql.SQLException: Data source rejected establishment of  connection,  message from server: "Host 'localhost.localdomain' is  not allowed to connect to this MySQL server"
      at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:650)
      at com.mysql.jdbc.Connection.createNewIO(Connection.java:1808)
      at com.mysql.jdbc.Connection.<init>(Connection.java:452)
      at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:411)
      at java.sql.DriverManager.getConnection(DriverManager.java:525)
      at java.sql.DriverManager.getConnection(DriverManager.java:171)
      at Liep.doGet(Liep.java:30)
  ...
  ...
  Can anyone help or give me a pointer to a website
  
  Byfour
  

			
---------------------------------
Yahoo! Shopping
 Find Great Deals on Holiday Gifts at Yahoo! Shopping 

RE: Tomcat JDBC connection with Mysql

Posted by Karthik <ka...@xius.org>.
Hi

   If  u have installed mysql on u'r sys ,there are docs in html format
within giving u details about the "grant permission" to u ip's"


read and use them


hope this helps

with regards
Karthik


-----Original Message-----
From: marju jalloh [mailto:jallohmarju@yahoo.com]
Sent: Monday, December 12, 2005 6:04 PM
To: Tomcat Users List
Subject: RE: Tomcat JDBC connection with Mysql


But how to Grant permission to an ip host


Karthik <ka...@xius.org> wrote:  hI

tHE PROBLEMS IS PRESENT WITHIN THE mysql SERVER,U NEED TO GIVE PERMISSION TO
THE ip HOST U ARE USING

TRY USING THE GRANT PERMISSION AND USE THE SAME,BUT U HAVE TO FLUSH OUT ALL
acl PREVELIAGES AVALIABEL IN MYSQL DB

   USE A FRONT END LIKE MYSQL FRONT TO DO THIS



HOPE THIS HELPS.




WITH REGARS
kARTHIK



-----Original Message-----
From: marju jalloh [mailto:jallohmarju@yahoo.com]
Sent: Monday, December 12, 2005 4:53 PM
To: Tomcat Users List
Subject: Tomcat JDBC connection with Mysql


 I can`connect to my database with via  servlet. The connection works well
in PHP but not with servlet. I have  googled but no solution.

  this is my error page I got

  java.sql.SQLException: Data source rejected establishment of  connection,
message from server: "Host 'localhost.localdomain' is  not allowed to
connect to this MySQL server"
      at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:650)
      at com.mysql.jdbc.Connection.createNewIO(Connection.java:1808)
      at com.mysql.jdbc.Connection.(Connection.java:452)
      at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:411)
      at java.sql.DriverManager.getConnection(DriverManager.java:525)
      at java.sql.DriverManager.getConnection(DriverManager.java:171)
      at Liep.doGet(Liep.java:30)
  ...
  ...
  Can anyone help or give me a pointer to a website

  Byfour



---------------------------------
Yahoo! Shopping
 Find Great Deals on Holiday Gifts at Yahoo! Shopping


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





---------------------------------
Yahoo! Shopping
 Find Great Deals on Holiday Gifts at Yahoo! Shopping


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


Re: Antwort: RE: Tomcat JDBC connection with Mysql

Posted by marju jalloh <ja...@yahoo.com>.
yes it is right I tried it with localhost and also eith the IP address
  
  Thanks for your response
  
  Byfour

Sebastian Funk <se...@mac.com> wrote:  Hi,

I got the same error a few weeks ago. in my case, the URL was wrong.  
you use:
 jdbc:mysql://l/AdressBook
Are you sure it's right? Is 'l' really the right host? Did you tried  
it with the ip-address?

Best Regards,
Sebastian
On Dec 12, 2005, at 2:37 PM, marju jalloh wrote:

> I went throug the permission and now I get another error
>
>       java.sql.SQLException: Unable to connect to any  hosts due to  
> exception:          java.net.SocketException:  
> java.net.ConnectException: Connection refused
>       ** BEGIN NESTED EXCEPTION **
>       java.net.SocketException
>       MESSAGE: java.net.ConnectException: Connection refused
>       STACKTRACE:
>       java.net.SocketException: java.net.ConnectException:  
> Connection refused
>
>   I don`t know if the problem is with Tomcat of the Driver of mysql  
> server
>   This is my code
>
>   ublic class Marju extends HttpServlet {
>     public void doGet(HttpServletRequest request,
>                        HttpServletResponse response)
>         throws ServletException, IOException {
>       response.setContentType("text/html");
>       PrintWriter out = response.getWriter();
>
>    Connection conn = null;
>
>              try
>              {
>                  String userName = "root";
>                  String password = "";
>                  String url = "jdbc:mysql://l/AdressBook";
>                  Class.forName("com.mysql.jdbc.Driver");
>                   conn = DriverManager.getConnection(url,  
> userName,password);
>                   out.println("Database connection established");
>              }
>              catch (Exception e)
>              {
>                   out.println("Can`t connect to database server!");
>                   e.printStackTrace();
>              }
>              finally
>              {
>                  if (conn != null)
>                  {
>                      try
>                      {
>                           conn.close ();
>                           System.out.println ("Database connection  
> terminated");
>
>                      }
>                       catch (Exception e) { /* ignore close errors  
> */ }
>                  }
>              }
>          out.println("my first servlet");
>                   }
>   }
>   Any help would be appreciated
>
>   Byfour
> Jan Behrens  wrote:  look here -->
> http://dev.mysql.com/doc/refman/4.1/en/connection-access.html
>
> rtfm ;)
>
> marju jalloh  schrieb am 12.12.2005 13:33:54:
>
>> But how to Grant permission to an ip host
>>
>>
>> Karthik  wrote:  hI
>>
>> tHE PROBLEMS IS PRESENT WITHIN THE mysql SERVER,U NEED TO GIVE
> PERMISSION TO
>> THE ip HOST U ARE USING
>>
>> TRY USING THE GRANT PERMISSION AND USE THE SAME,BUT U HAVE TO  
>> FLUSH OUT
> ALL
>> acl PREVELIAGES AVALIABEL IN MYSQL DB
>>
>>    USE A FRONT END LIKE MYSQL FRONT TO DO THIS
>>
>>
>>
>> HOPE THIS HELPS.
>>
>>
>>
>>
>> WITH REGARS
>> kARTHIK
>>
>>
>>
>> -----Original Message-----
>> From: marju jalloh [mailto:jallohmarju@yahoo.com]
>> Sent: Monday, December 12, 2005 4:53 PM
>> To: Tomcat Users List
>> Subject: Tomcat JDBC connection with Mysql
>>
>>
>>  I can`connect to my database with via  servlet. The connection works
> well
>> in PHP but not with servlet. I have  googled but no solution.
>>
>>   this is my error page I got
>>
>>   java.sql.SQLException: Data source rejected establishment of
> connection,
>> message from server: "Host 'localhost.localdomain' is  not allowed to
>> connect to this MySQL server"
>>       at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:650)
>>       at com.mysql.jdbc.Connection.createNewIO(Connection.java:1808)
>>       at com.mysql.jdbc.Connection.(Connection.java:452)
>>       at
>>
> com.mysql.jdbc.NonRegisteringDriver.connect 
> (NonRegisteringDriver.java:411)
>>       at java.sql.DriverManager.getConnection(DriverManager.java:525)
>>       at java.sql.DriverManager.getConnection(DriverManager.java:171)
>>       at Liep.doGet(Liep.java:30)
>>   ...
>>   ...
>>   Can anyone help or give me a pointer to a website
>>
>>   Byfour
>>
>>
>>
>> ---------------------------------
>> Yahoo! Shopping
>>  Find Great Deals on Holiday Gifts at Yahoo! Shopping
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>>
>>
>> ---------------------------------
>> Yahoo! Shopping
>>  Find Great Deals on Holiday Gifts at Yahoo! Shopping
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>
>    
> ---------------------------------
> Yahoo! Shopping
>  Find Great Deals on Holiday Gifts at Yahoo! Shopping


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




			
---------------------------------
Yahoo! Shopping
 Find Great Deals on Holiday Gifts at Yahoo! Shopping 

RE: Antwort: RE: Tomcat JDBC connection with Mysql

Posted by Karthik <ka...@xius.org>.
Hi


  Use the default mysql port 3306 instead of the '1'

  Print the log files and further get back to the form

  something like this needsto be used


jdbc:mysql://192.168.10.147:3306/<db>?user=XYZ&password=anc&autoReconnect=tr
ue



 hope this helps with regards
Karthik

-----Original Message-----
From: Sebastian Funk [mailto:sebastianfunk@mac.com]
Sent: Monday, December 12, 2005 7:14 PM
To: Tomcat Users List
Subject: Re: Antwort: RE: Tomcat JDBC connection with Mysql


Hi,

I got the same error a few weeks ago. in my case, the URL was wrong.
you use:
	jdbc:mysql://l/AdressBook
Are you sure it's right? Is 'l' really the right host? Did you tried
it with the ip-address?

Best Regards,
Sebastian
On Dec 12, 2005, at 2:37 PM, marju jalloh wrote:

> I went throug the permission and now I get another error
>
>       java.sql.SQLException: Unable to connect to any  hosts due to
> exception:          java.net.SocketException:
> java.net.ConnectException: Connection refused
>       ** BEGIN NESTED EXCEPTION **
>       java.net.SocketException
>       MESSAGE: java.net.ConnectException: Connection refused
>       STACKTRACE:
>       java.net.SocketException: java.net.ConnectException:
> Connection refused
>
>   I don`t know if the problem is with Tomcat of the Driver of mysql
> server
>   This is my code
>
>   ublic class Marju extends HttpServlet {
>     public void doGet(HttpServletRequest request,
>                        HttpServletResponse response)
>         throws ServletException, IOException {
>       response.setContentType("text/html");
>       PrintWriter out = response.getWriter();
>
>    Connection conn = null;
>
>              try
>              {
>                  String userName = "root";
>                  String password = "";
>                  String url = "jdbc:mysql://l/AdressBook";
>                  Class.forName("com.mysql.jdbc.Driver");
>                   conn = DriverManager.getConnection(url,
> userName,password);
>                   out.println("Database connection established");
>              }
>              catch (Exception e)
>              {
>                   out.println("Can`t connect to database server!");
>                   e.printStackTrace();
>              }
>              finally
>              {
>                  if (conn != null)
>                  {
>                      try
>                      {
>                           conn.close ();
>                           System.out.println ("Database connection
> terminated");
>
>                      }
>                       catch (Exception e) { /* ignore close errors
> */ }
>                  }
>              }
>          out.println("my first servlet");
>                   }
>   }
>   Any help would be appreciated
>
>   Byfour
> Jan Behrens <Ja...@offis.de> wrote:  look here -->
> http://dev.mysql.com/doc/refman/4.1/en/connection-access.html
>
> rtfm ;)
>
> marju jalloh  schrieb am 12.12.2005 13:33:54:
>
>> But how to Grant permission to an ip host
>>
>>
>> Karthik  wrote:  hI
>>
>> tHE PROBLEMS IS PRESENT WITHIN THE mysql SERVER,U NEED TO GIVE
> PERMISSION TO
>> THE ip HOST U ARE USING
>>
>> TRY USING THE GRANT PERMISSION AND USE THE SAME,BUT U HAVE TO
>> FLUSH OUT
> ALL
>> acl PREVELIAGES AVALIABEL IN MYSQL DB
>>
>>    USE A FRONT END LIKE MYSQL FRONT TO DO THIS
>>
>>
>>
>> HOPE THIS HELPS.
>>
>>
>>
>>
>> WITH REGARS
>> kARTHIK
>>
>>
>>
>> -----Original Message-----
>> From: marju jalloh [mailto:jallohmarju@yahoo.com]
>> Sent: Monday, December 12, 2005 4:53 PM
>> To: Tomcat Users List
>> Subject: Tomcat JDBC connection with Mysql
>>
>>
>>  I can`connect to my database with via  servlet. The connection works
> well
>> in PHP but not with servlet. I have  googled but no solution.
>>
>>   this is my error page I got
>>
>>   java.sql.SQLException: Data source rejected establishment of
> connection,
>> message from server: "Host 'localhost.localdomain' is  not allowed to
>> connect to this MySQL server"
>>       at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:650)
>>       at com.mysql.jdbc.Connection.createNewIO(Connection.java:1808)
>>       at com.mysql.jdbc.Connection.(Connection.java:452)
>>       at
>>
> com.mysql.jdbc.NonRegisteringDriver.connect
> (NonRegisteringDriver.java:411)
>>       at java.sql.DriverManager.getConnection(DriverManager.java:525)
>>       at java.sql.DriverManager.getConnection(DriverManager.java:171)
>>       at Liep.doGet(Liep.java:30)
>>   ...
>>   ...
>>   Can anyone help or give me a pointer to a website
>>
>>   Byfour
>>
>>
>>
>> ---------------------------------
>> Yahoo! Shopping
>>  Find Great Deals on Holiday Gifts at Yahoo! Shopping
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>>
>>
>> ---------------------------------
>> Yahoo! Shopping
>>  Find Great Deals on Holiday Gifts at Yahoo! Shopping
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>
>
> ---------------------------------
> Yahoo! Shopping
>  Find Great Deals on Holiday Gifts at Yahoo! Shopping


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


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


Re: Antwort: RE: Tomcat JDBC connection with Mysql

Posted by Sebastian Funk <se...@mac.com>.
Hi,

I got the same error a few weeks ago. in my case, the URL was wrong.  
you use:
	jdbc:mysql://l/AdressBook
Are you sure it's right? Is 'l' really the right host? Did you tried  
it with the ip-address?

Best Regards,
Sebastian
On Dec 12, 2005, at 2:37 PM, marju jalloh wrote:

> I went throug the permission and now I get another error
>
>       java.sql.SQLException: Unable to connect to any  hosts due to  
> exception:          java.net.SocketException:  
> java.net.ConnectException: Connection refused
>       ** BEGIN NESTED EXCEPTION **
>       java.net.SocketException
>       MESSAGE: java.net.ConnectException: Connection refused
>       STACKTRACE:
>       java.net.SocketException: java.net.ConnectException:  
> Connection refused
>
>   I don`t know if the problem is with Tomcat of the Driver of mysql  
> server
>   This is my code
>
>   ublic class Marju extends HttpServlet {
>     public void doGet(HttpServletRequest request,
>                        HttpServletResponse response)
>         throws ServletException, IOException {
>       response.setContentType("text/html");
>       PrintWriter out = response.getWriter();
>
>    Connection conn = null;
>
>              try
>              {
>                  String userName = "root";
>                  String password = "";
>                  String url = "jdbc:mysql://l/AdressBook";
>                  Class.forName("com.mysql.jdbc.Driver");
>                   conn = DriverManager.getConnection(url,  
> userName,password);
>                   out.println("Database connection established");
>              }
>              catch (Exception e)
>              {
>                   out.println("Can`t connect to database server!");
>                   e.printStackTrace();
>              }
>              finally
>              {
>                  if (conn != null)
>                  {
>                      try
>                      {
>                           conn.close ();
>                           System.out.println ("Database connection  
> terminated");
>
>                      }
>                       catch (Exception e) { /* ignore close errors  
> */ }
>                  }
>              }
>          out.println("my first servlet");
>                   }
>   }
>   Any help would be appreciated
>
>   Byfour
> Jan Behrens <Ja...@offis.de> wrote:  look here -->
> http://dev.mysql.com/doc/refman/4.1/en/connection-access.html
>
> rtfm ;)
>
> marju jalloh  schrieb am 12.12.2005 13:33:54:
>
>> But how to Grant permission to an ip host
>>
>>
>> Karthik  wrote:  hI
>>
>> tHE PROBLEMS IS PRESENT WITHIN THE mysql SERVER,U NEED TO GIVE
> PERMISSION TO
>> THE ip HOST U ARE USING
>>
>> TRY USING THE GRANT PERMISSION AND USE THE SAME,BUT U HAVE TO  
>> FLUSH OUT
> ALL
>> acl PREVELIAGES AVALIABEL IN MYSQL DB
>>
>>    USE A FRONT END LIKE MYSQL FRONT TO DO THIS
>>
>>
>>
>> HOPE THIS HELPS.
>>
>>
>>
>>
>> WITH REGARS
>> kARTHIK
>>
>>
>>
>> -----Original Message-----
>> From: marju jalloh [mailto:jallohmarju@yahoo.com]
>> Sent: Monday, December 12, 2005 4:53 PM
>> To: Tomcat Users List
>> Subject: Tomcat JDBC connection with Mysql
>>
>>
>>  I can`connect to my database with via  servlet. The connection works
> well
>> in PHP but not with servlet. I have  googled but no solution.
>>
>>   this is my error page I got
>>
>>   java.sql.SQLException: Data source rejected establishment of
> connection,
>> message from server: "Host 'localhost.localdomain' is  not allowed to
>> connect to this MySQL server"
>>       at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:650)
>>       at com.mysql.jdbc.Connection.createNewIO(Connection.java:1808)
>>       at com.mysql.jdbc.Connection.(Connection.java:452)
>>       at
>>
> com.mysql.jdbc.NonRegisteringDriver.connect 
> (NonRegisteringDriver.java:411)
>>       at java.sql.DriverManager.getConnection(DriverManager.java:525)
>>       at java.sql.DriverManager.getConnection(DriverManager.java:171)
>>       at Liep.doGet(Liep.java:30)
>>   ...
>>   ...
>>   Can anyone help or give me a pointer to a website
>>
>>   Byfour
>>
>>
>>
>> ---------------------------------
>> Yahoo! Shopping
>>  Find Great Deals on Holiday Gifts at Yahoo! Shopping
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>>
>>
>> ---------------------------------
>> Yahoo! Shopping
>>  Find Great Deals on Holiday Gifts at Yahoo! Shopping
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>
> 			
> ---------------------------------
> Yahoo! Shopping
>  Find Great Deals on Holiday Gifts at Yahoo! Shopping


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


RE: Tomcat JDBC connection with MySQL

Posted by marju jalloh <ja...@yahoo.com>.
I made it
      Thanks everyone especially jan and Kirthik
  
  Byfour

Jan Behrens <Ja...@offis.de> wrote:  >                  String userName = "root";
>                  String password = "";
>                  String URL = "jdbc:mysql://l/AdressBook";

Are you sure this is correct? You are connecting to a MySQL server at URL 
"1" and db "AdressBook" as root without a password... 

you should:
- secure MySQL root with a password
- create a new user with rights limited to db "AdressBook" and allow this 
user to connect from "%" for now
- set a password for that user
- reload user table!
- change your url to the correct server, e.g. 
"jdbc:mysql//localhost:3306/AdressBook"
- try again

HTH, jan


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




			
---------------------------------
Yahoo! Shopping
 Find Great Deals on Holiday Gifts at Yahoo! Shopping 

RE: Tomcat JDBC connection with MySQL

Posted by Jan Behrens <Ja...@offis.de>.
>                  String userName = "root";
>                  String password = "";
>                  String URL = "jdbc:mysql://l/AdressBook";

Are you sure this is correct? You are connecting to a MySQL server at URL 
"1" and db "AdressBook" as root without a password... 

you should:
- secure MySQL root with a password
- create a new user with rights limited to db "AdressBook" and allow this 
user to connect from "%" for now
- set a password for that user
- reload user table!
- change your url to the correct server, e.g. 
"jdbc:mysql//localhost:3306/AdressBook"
- try again

HTH, jan


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


Re: Antwort: RE: Tomcat JDBC connection with Mysql

Posted by marju jalloh <ja...@yahoo.com>.
I went throug the permission and now I get another error
  
      java.sql.SQLException: Unable to connect to any  hosts due to exception:          java.net.SocketException: java.net.ConnectException: Connection refused
      ** BEGIN NESTED EXCEPTION ** 
      java.net.SocketException
      MESSAGE: java.net.ConnectException: Connection refused
      STACKTRACE:
      java.net.SocketException: java.net.ConnectException: Connection refused
    
  I don`t know if the problem is with Tomcat of the Driver of mysql server
  This is my code
  
  ublic class Marju extends HttpServlet {
    public void doGet(HttpServletRequest request,
                       HttpServletResponse response)
        throws ServletException, IOException {
      response.setContentType("text/html");
      PrintWriter out = response.getWriter();
  
   Connection conn = null;
  
             try
             {
                 String userName = "root";
                 String password = "";
                 String url = "jdbc:mysql://l/AdressBook";
                 Class.forName("com.mysql.jdbc.Driver");
                  conn = DriverManager.getConnection(url, userName,password);
                  out.println("Database connection established");
             }
             catch (Exception e)
             {
                  out.println("Can`t connect to database server!");
                  e.printStackTrace();
             }
             finally
             {
                 if (conn != null)
                 {
                     try
                     {
                          conn.close ();
                          System.out.println ("Database connection terminated");
                            
                     }
                      catch (Exception e) { /* ignore close errors */ }
                 }
             }
         out.println("my first servlet");
                  }
  }
  Any help would be appreciated
  
  Byfour
Jan Behrens <Ja...@offis.de> wrote:  look here --> 
http://dev.mysql.com/doc/refman/4.1/en/connection-access.html

rtfm ;)

marju jalloh  schrieb am 12.12.2005 13:33:54:

> But how to Grant permission to an ip host
> 
> 
> Karthik  wrote:  hI
> 
> tHE PROBLEMS IS PRESENT WITHIN THE mysql SERVER,U NEED TO GIVE 
PERMISSION TO
> THE ip HOST U ARE USING
> 
> TRY USING THE GRANT PERMISSION AND USE THE SAME,BUT U HAVE TO FLUSH OUT 
ALL
> acl PREVELIAGES AVALIABEL IN MYSQL DB
> 
>    USE A FRONT END LIKE MYSQL FRONT TO DO THIS
> 
> 
> 
> HOPE THIS HELPS.
> 
> 
> 
> 
> WITH REGARS
> kARTHIK
> 
> 
> 
> -----Original Message-----
> From: marju jalloh [mailto:jallohmarju@yahoo.com]
> Sent: Monday, December 12, 2005 4:53 PM
> To: Tomcat Users List
> Subject: Tomcat JDBC connection with Mysql
> 
> 
>  I can`connect to my database with via  servlet. The connection works 
well
> in PHP but not with servlet. I have  googled but no solution.
> 
>   this is my error page I got
> 
>   java.sql.SQLException: Data source rejected establishment of 
connection,
> message from server: "Host 'localhost.localdomain' is  not allowed to
> connect to this MySQL server"
>       at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:650)
>       at com.mysql.jdbc.Connection.createNewIO(Connection.java:1808)
>       at com.mysql.jdbc.Connection.(Connection.java:452)
>       at
> 
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:411)
>       at java.sql.DriverManager.getConnection(DriverManager.java:525)
>       at java.sql.DriverManager.getConnection(DriverManager.java:171)
>       at Liep.doGet(Liep.java:30)
>   ...
>   ...
>   Can anyone help or give me a pointer to a website
> 
>   Byfour
> 
> 
> 
> ---------------------------------
> Yahoo! Shopping
>  Find Great Deals on Holiday Gifts at Yahoo! Shopping
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 
> 
> 
> ---------------------------------
> Yahoo! Shopping
>  Find Great Deals on Holiday Gifts at Yahoo! Shopping 

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




			
---------------------------------
Yahoo! Shopping
 Find Great Deals on Holiday Gifts at Yahoo! Shopping 

RE: Antwort: RE: Tomcat JDBC connection with Mysql

Posted by ALEX HYDE <al...@btinternet.com>.
Thanks for that Richard,
  
  I have to use fedora core 3 but I can use Tomcat 5 and probably should! Cheers for the heads up.
  
  Alex

Richard Mixon <rn...@qwest.net> wrote:  Jan,

Tomcat runs just fine on Linux. Use the most recent version (Fedora Core 4
is fine, or OpenSuse 10, or ...). These should come with a fairly recent
version of Tomcat (5.x or 5.5.x) or the packages should be available.

I prefer to install Tomcat myself on Linux, from a downloaded binary (tar.gz
file) as some of the Linux distributions break things up in various ways,
that I find a bit confusing (though I can also usually see the logic of it
too).

However, why in the world would you be developing with Tomcat 4 - it is two
major versions behind. If you had an existing production version to support,
that would be more understandable.  But you are starting out clean it seems
- there are many security and performance fixes are in Tomcat 5.5.

HTH - Richard


-----Original Message-----
From: ALEX HYDE [mailto:alex.hyde@btinternet.com] 
Sent: Thursday, December 15, 2005 10:46 AM
To: Tomcat Users List
Subject: Re: Antwort: RE: Tomcat JDBC connection with Mysql

Hi All,
  
  I have been developing a system using Tomcat on my Windows box at home.  I
am now ready to deploy it to a server. I was thinking of using Fedora  Core
because it is cheaper and I heard it has a fiarly good reputation.  Could
anyone pass on any experiences of running Tomcat 4 on Linux or  even Fedora?
I am starting with a clean box and will need to add java  and tomcat. COUld
anyone point me in the dircetion of nay good  tutorials on this?
  
  Thanks all

Jan Behrens  wrote:  look here -->
http://dev.mysql.com/doc/refman/4.1/en/connection-access.html

rtfm ;)

marju jalloh  schrieb am 12.12.2005 13:33:54:

> But how to Grant permission to an ip host
> 
> 
> Karthik  wrote:  hI
> 
> tHE PROBLEMS IS PRESENT WITHIN THE mysql SERVER,U NEED TO GIVE
PERMISSION TO
> THE ip HOST U ARE USING
> 
> TRY USING THE GRANT PERMISSION AND USE THE SAME,BUT U HAVE TO FLUSH 
> OUT
ALL
> acl PREVELIAGES AVALIABEL IN MYSQL DB
> 
>    USE A FRONT END LIKE MYSQL FRONT TO DO THIS
> 
> 
> 
> HOPE THIS HELPS.
> 
> 
> 
> 
> WITH REGARS
> kARTHIK
> 
> 
> 
> -----Original Message-----
> From: marju jalloh [mailto:jallohmarju@yahoo.com]
> Sent: Monday, December 12, 2005 4:53 PM
> To: Tomcat Users List
> Subject: Tomcat JDBC connection with Mysql
> 
> 
>  I can`connect to my database with via  servlet. The connection works
well
> in PHP but not with servlet. I have  googled but no solution.
> 
>   this is my error page I got
> 
>   java.sql.SQLException: Data source rejected establishment of
connection,
> message from server: "Host 'localhost.localdomain' is  not allowed to 
> connect to this MySQL server"
>       at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:650)
>       at com.mysql.jdbc.Connection.createNewIO(Connection.java:1808)
>       at com.mysql.jdbc.Connection.(Connection.java:452)
>       at
> 
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:411)
>       at java.sql.DriverManager.getConnection(DriverManager.java:525)
>       at java.sql.DriverManager.getConnection(DriverManager.java:171)
>       at Liep.doGet(Liep.java:30)
>   ...
>   ...
>   Can anyone help or give me a pointer to a website
> 
>   Byfour
> 
> 
> 
> ---------------------------------
> Yahoo! Shopping
>  Find Great Deals on Holiday Gifts at Yahoo! Shopping
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 
> 
> 
> ---------------------------------
> Yahoo! Shopping
>  Find Great Deals on Holiday Gifts at Yahoo! Shopping

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




  
---------------------------------
To help you stay safe and secure online, we've developed the all new Yahoo!
Security Centre.


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




		
---------------------------------
How much free photo storage do you get? Store your holiday snaps for FREE with Yahoo! Photos. Get Yahoo! Photos

RE: Antwort: RE: Tomcat JDBC connection with Mysql

Posted by Richard Mixon <rn...@qwest.net>.
Jan,

Tomcat runs just fine on Linux. Use the most recent version (Fedora Core 4
is fine, or OpenSuse 10, or ...). These should come with a fairly recent
version of Tomcat (5.x or 5.5.x) or the packages should be available.

I prefer to install Tomcat myself on Linux, from a downloaded binary (tar.gz
file) as some of the Linux distributions break things up in various ways,
that I find a bit confusing (though I can also usually see the logic of it
too).

However, why in the world would you be developing with Tomcat 4 - it is two
major versions behind. If you had an existing production version to support,
that would be more understandable.  But you are starting out clean it seems
- there are many security and performance fixes are in Tomcat 5.5.

HTH - Richard


-----Original Message-----
From: ALEX HYDE [mailto:alex.hyde@btinternet.com] 
Sent: Thursday, December 15, 2005 10:46 AM
To: Tomcat Users List
Subject: Re: Antwort: RE: Tomcat JDBC connection with Mysql

Hi All,
  
  I have been developing a system using Tomcat on my Windows box at home.  I
am now ready to deploy it to a server. I was thinking of using Fedora  Core
because it is cheaper and I heard it has a fiarly good reputation.  Could
anyone pass on any experiences of running Tomcat 4 on Linux or  even Fedora?
I am starting with a clean box and will need to add java  and tomcat. COUld
anyone point me in the dircetion of nay good  tutorials on this?
  
  Thanks all

Jan Behrens <Ja...@offis.de> wrote:  look here -->
http://dev.mysql.com/doc/refman/4.1/en/connection-access.html

rtfm ;)

marju jalloh  schrieb am 12.12.2005 13:33:54:

> But how to Grant permission to an ip host
> 
> 
> Karthik  wrote:  hI
> 
> tHE PROBLEMS IS PRESENT WITHIN THE mysql SERVER,U NEED TO GIVE
PERMISSION TO
> THE ip HOST U ARE USING
> 
> TRY USING THE GRANT PERMISSION AND USE THE SAME,BUT U HAVE TO FLUSH 
> OUT
ALL
> acl PREVELIAGES AVALIABEL IN MYSQL DB
> 
>    USE A FRONT END LIKE MYSQL FRONT TO DO THIS
> 
> 
> 
> HOPE THIS HELPS.
> 
> 
> 
> 
> WITH REGARS
> kARTHIK
> 
> 
> 
> -----Original Message-----
> From: marju jalloh [mailto:jallohmarju@yahoo.com]
> Sent: Monday, December 12, 2005 4:53 PM
> To: Tomcat Users List
> Subject: Tomcat JDBC connection with Mysql
> 
> 
>  I can`connect to my database with via  servlet. The connection works
well
> in PHP but not with servlet. I have  googled but no solution.
> 
>   this is my error page I got
> 
>   java.sql.SQLException: Data source rejected establishment of
connection,
> message from server: "Host 'localhost.localdomain' is  not allowed to 
> connect to this MySQL server"
>       at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:650)
>       at com.mysql.jdbc.Connection.createNewIO(Connection.java:1808)
>       at com.mysql.jdbc.Connection.(Connection.java:452)
>       at
> 
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:411)
>       at java.sql.DriverManager.getConnection(DriverManager.java:525)
>       at java.sql.DriverManager.getConnection(DriverManager.java:171)
>       at Liep.doGet(Liep.java:30)
>   ...
>   ...
>   Can anyone help or give me a pointer to a website
> 
>   Byfour
> 
> 
> 
> ---------------------------------
> Yahoo! Shopping
>  Find Great Deals on Holiday Gifts at Yahoo! Shopping
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 
> 
> 
> ---------------------------------
> Yahoo! Shopping
>  Find Great Deals on Holiday Gifts at Yahoo! Shopping

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




		
---------------------------------
To help you stay safe and secure online, we've developed the all new Yahoo!
Security Centre.


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


Re: Antwort: RE: Tomcat JDBC connection with Mysql

Posted by ALEX HYDE <al...@btinternet.com>.
Hi All,
  
  I have been developing a system using Tomcat on my Windows box at home.  I am now ready to deploy it to a server. I was thinking of using Fedora  Core because it is cheaper and I heard it has a fiarly good reputation.  Could anyone pass on any experiences of running Tomcat 4 on Linux or  even Fedora? I am starting with a clean box and will need to add java  and tomcat. COUld anyone point me in the dircetion of nay good  tutorials on this?
  
  Thanks all

Jan Behrens <Ja...@offis.de> wrote:  look here --> 
http://dev.mysql.com/doc/refman/4.1/en/connection-access.html

rtfm ;)

marju jalloh  schrieb am 12.12.2005 13:33:54:

> But how to Grant permission to an ip host
> 
> 
> Karthik  wrote:  hI
> 
> tHE PROBLEMS IS PRESENT WITHIN THE mysql SERVER,U NEED TO GIVE 
PERMISSION TO
> THE ip HOST U ARE USING
> 
> TRY USING THE GRANT PERMISSION AND USE THE SAME,BUT U HAVE TO FLUSH OUT 
ALL
> acl PREVELIAGES AVALIABEL IN MYSQL DB
> 
>    USE A FRONT END LIKE MYSQL FRONT TO DO THIS
> 
> 
> 
> HOPE THIS HELPS.
> 
> 
> 
> 
> WITH REGARS
> kARTHIK
> 
> 
> 
> -----Original Message-----
> From: marju jalloh [mailto:jallohmarju@yahoo.com]
> Sent: Monday, December 12, 2005 4:53 PM
> To: Tomcat Users List
> Subject: Tomcat JDBC connection with Mysql
> 
> 
>  I can`connect to my database with via  servlet. The connection works 
well
> in PHP but not with servlet. I have  googled but no solution.
> 
>   this is my error page I got
> 
>   java.sql.SQLException: Data source rejected establishment of 
connection,
> message from server: "Host 'localhost.localdomain' is  not allowed to
> connect to this MySQL server"
>       at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:650)
>       at com.mysql.jdbc.Connection.createNewIO(Connection.java:1808)
>       at com.mysql.jdbc.Connection.(Connection.java:452)
>       at
> 
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:411)
>       at java.sql.DriverManager.getConnection(DriverManager.java:525)
>       at java.sql.DriverManager.getConnection(DriverManager.java:171)
>       at Liep.doGet(Liep.java:30)
>   ...
>   ...
>   Can anyone help or give me a pointer to a website
> 
>   Byfour
> 
> 
> 
> ---------------------------------
> Yahoo! Shopping
>  Find Great Deals on Holiday Gifts at Yahoo! Shopping
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 
> 
> 
> ---------------------------------
> Yahoo! Shopping
>  Find Great Deals on Holiday Gifts at Yahoo! Shopping 

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




		
---------------------------------
To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre.

Antwort: RE: Tomcat JDBC connection with Mysql

Posted by Jan Behrens <Ja...@offis.de>.
look here --> 
http://dev.mysql.com/doc/refman/4.1/en/connection-access.html

rtfm ;)

marju jalloh <ja...@yahoo.com> schrieb am 12.12.2005 13:33:54:

> But how to Grant permission to an ip host
> 
> 
> Karthik <ka...@xius.org> wrote:  hI
> 
> tHE PROBLEMS IS PRESENT WITHIN THE mysql SERVER,U NEED TO GIVE 
PERMISSION TO
> THE ip HOST U ARE USING
> 
> TRY USING THE GRANT PERMISSION AND USE THE SAME,BUT U HAVE TO FLUSH OUT 
ALL
> acl PREVELIAGES AVALIABEL IN MYSQL DB
> 
>    USE A FRONT END LIKE MYSQL FRONT TO DO THIS
> 
> 
> 
> HOPE THIS HELPS.
> 
> 
> 
> 
> WITH REGARS
> kARTHIK
> 
> 
> 
> -----Original Message-----
> From: marju jalloh [mailto:jallohmarju@yahoo.com]
> Sent: Monday, December 12, 2005 4:53 PM
> To: Tomcat Users List
> Subject: Tomcat JDBC connection with Mysql
> 
> 
>  I can`connect to my database with via  servlet. The connection works 
well
> in PHP but not with servlet. I have  googled but no solution.
> 
>   this is my error page I got
> 
>   java.sql.SQLException: Data source rejected establishment of 
connection,
> message from server: "Host 'localhost.localdomain' is  not allowed to
> connect to this MySQL server"
>       at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:650)
>       at com.mysql.jdbc.Connection.createNewIO(Connection.java:1808)
>       at com.mysql.jdbc.Connection.(Connection.java:452)
>       at
> 
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:411)
>       at java.sql.DriverManager.getConnection(DriverManager.java:525)
>       at java.sql.DriverManager.getConnection(DriverManager.java:171)
>       at Liep.doGet(Liep.java:30)
>   ...
>   ...
>   Can anyone help or give me a pointer to a website
> 
>   Byfour
> 
> 
> 
> ---------------------------------
> Yahoo! Shopping
>  Find Great Deals on Holiday Gifts at Yahoo! Shopping
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 
> 
> 
> ---------------------------------
> Yahoo! Shopping
>  Find Great Deals on Holiday Gifts at Yahoo! Shopping 

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


RE: Tomcat JDBC connection with Mysql

Posted by marju jalloh <ja...@yahoo.com>.
But how to Grant permission to an ip host
  

Karthik <ka...@xius.org> wrote:  hI

tHE PROBLEMS IS PRESENT WITHIN THE mysql SERVER,U NEED TO GIVE PERMISSION TO
THE ip HOST U ARE USING

TRY USING THE GRANT PERMISSION AND USE THE SAME,BUT U HAVE TO FLUSH OUT ALL
acl PREVELIAGES AVALIABEL IN MYSQL DB

   USE A FRONT END LIKE MYSQL FRONT TO DO THIS



HOPE THIS HELPS.




WITH REGARS
kARTHIK



-----Original Message-----
From: marju jalloh [mailto:jallohmarju@yahoo.com]
Sent: Monday, December 12, 2005 4:53 PM
To: Tomcat Users List
Subject: Tomcat JDBC connection with Mysql


 I can`connect to my database with via  servlet. The connection works well
in PHP but not with servlet. I have  googled but no solution.

  this is my error page I got

  java.sql.SQLException: Data source rejected establishment of  connection,
message from server: "Host 'localhost.localdomain' is  not allowed to
connect to this MySQL server"
      at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:650)
      at com.mysql.jdbc.Connection.createNewIO(Connection.java:1808)
      at com.mysql.jdbc.Connection.(Connection.java:452)
      at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:411)
      at java.sql.DriverManager.getConnection(DriverManager.java:525)
      at java.sql.DriverManager.getConnection(DriverManager.java:171)
      at Liep.doGet(Liep.java:30)
  ...
  ...
  Can anyone help or give me a pointer to a website

  Byfour



---------------------------------
Yahoo! Shopping
 Find Great Deals on Holiday Gifts at Yahoo! Shopping


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




			
---------------------------------
Yahoo! Shopping
 Find Great Deals on Holiday Gifts at Yahoo! Shopping 

RE: Tomcat JDBC connection with Mysql

Posted by Karthik <ka...@xius.org>.
hI

tHE PROBLEMS IS PRESENT WITHIN THE mysql SERVER,U NEED TO GIVE PERMISSION TO
THE ip HOST U ARE USING

TRY USING THE GRANT PERMISSION AND USE THE SAME,BUT U HAVE TO FLUSH OUT ALL
acl PREVELIAGES AVALIABEL IN MYSQL DB

   USE A FRONT END LIKE MYSQL FRONT TO DO THIS



HOPE THIS HELPS.




WITH REGARS
kARTHIK



-----Original Message-----
From: marju jalloh [mailto:jallohmarju@yahoo.com]
Sent: Monday, December 12, 2005 4:53 PM
To: Tomcat Users List
Subject: Tomcat JDBC connection with Mysql


 I can`connect to my database with via  servlet. The connection works well
in PHP but not with servlet. I have  googled but no solution.

  this is my error page I got

  java.sql.SQLException: Data source rejected establishment of  connection,
message from server: "Host 'localhost.localdomain' is  not allowed to
connect to this MySQL server"
      at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:650)
      at com.mysql.jdbc.Connection.createNewIO(Connection.java:1808)
      at com.mysql.jdbc.Connection.<init>(Connection.java:452)
      at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:411)
      at java.sql.DriverManager.getConnection(DriverManager.java:525)
      at java.sql.DriverManager.getConnection(DriverManager.java:171)
      at Liep.doGet(Liep.java:30)
  ...
  ...
  Can anyone help or give me a pointer to a website

  Byfour



---------------------------------
Yahoo! Shopping
 Find Great Deals on Holiday Gifts at Yahoo! Shopping


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


Antwort: Tomcat JDBC connection with Mysql

Posted by Jan Behrens <Ja...@offis.de>.
looks like your mysql user does not allow connections from the url of your 
tomcat. check whether access to mysql is granted to 'localhost' and (both 
entries!) '%'. the later should be used only for debugging however, better 
to include just the specific name of the tomcat hostname under named hosts 
in mysql.

afterwards don't forget to reload the user table in mysql and try again. 

HTH, jan

marju jalloh <ja...@yahoo.com> schrieb am 12.12.2005 12:22:30:

>  I can`connect to my database with via  servlet. The connection 
> works well in PHP but not with servlet. I have  googled but no solution.
> 
>   this is my error page I got
> 
>   java.sql.SQLException: Data source rejected establishment of 
> connection,  message from server: "Host 'localhost.localdomain' is 
> not allowed to connect to this MySQL server"
>       at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:650)
>       at com.mysql.jdbc.Connection.createNewIO(Connection.java:1808)
>       at com.mysql.jdbc.Connection.<init>(Connection.java:452)
>       at com.mysql.jdbc.NonRegisteringDriver.
> connect(NonRegisteringDriver.java:411)
>       at java.sql.DriverManager.getConnection(DriverManager.java:525)
>       at java.sql.DriverManager.getConnection(DriverManager.java:171)
>       at Liep.doGet(Liep.java:30)
>   ...
>   ...
>   Can anyone help or give me a pointer to a website
> 
>   Byfour
> 
> 
> 
> ---------------------------------
> Yahoo! Shopping
>  Find Great Deals on Holiday Gifts at Yahoo! Shopping 

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