Results 1 to 4 of 4

Thread: Tomcat can't connect to MySQL

  1. #1
    Join Date
    Jul 2008
    Beans
    1

    Tomcat can't connect to MySQL

    Mine is Ubuntu 8.10, Tomcat5.5 and MySQL5.0. I found if I start tomcat with /etc/init.d/tomcat5.5 start, it cannot connect to MySQL database and throws an exception "Communications link failure". But if I use /usr/share/tomcat5.5/bin/startup.sh, tomcat works well. I want to make init.d/tomcat5.5 support MySQL but I don't know how to do. Can anyone give me a hand? Thanks.

  2. #2
    Join Date
    Mar 2006
    Location
    Williams Lake
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Tomcat can't connect to MySQL

    To do any thing with mysql and a web server you're going to have to install php. Check out this link:

    http://wiki.apache.org/tomcat/UsingPhp

    Jim

  3. #3
    Join Date
    Nov 2007
    Location
    New Zealand
    Beans
    1,026
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Tomcat can't connect to MySQL

    Quote Originally Posted by cariboo907 View Post
    To do any thing with mysql and a web server you're going to have to install php. Check out this link:

    http://wiki.apache.org/tomcat/UsingPhp

    Jim
    Tomcat is a servlet container.

    What are you trying to do? Are you trying to run a Java web application? If you are trying to run PHP or static web pages you are better off with Apache HTTP server.

    You can run standard type web pages in Tomcat but it is not considered to be the right way if doing things.

  4. #4
    Join Date
    Jul 2008
    Beans
    4

    Talking Re: Tomcat can't connect to MySQL

    my name is azhar i am new to ubuntu but i really like's it. the problem with my office pc is i cannot do mp2 from datastream. how ? is it possible. system mysql 6 and mp2 work orders... pls help

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •