As the error indicates, a port can only be used by a single application at once. In order to resolve the problem, you'll need to change the port number for one or the other. To change the port that Tomcat is listening on, edit your
server.xml and find the "Connector" section. On Ubuntu, the configuration file can be found at
/etc/tomcat7/server.xml (edit the version number as needed). It should look like:
<Connector port="8080" protocol="HTTP/1.1"
Change 8080 to a different number and restart Tomcat for the changes to take effect.
Though, it is unusual that MySql is listening on port 8080. By default, it listens on port 3306. If you'd like to adjust the port that it is running on, edit the file
/etc/mysql/my.conf and change the port number in this section:
# * Basic Settings
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
Again, remember to restart MySql for the changes to take effect.
For more information on getting Tomcat up and running on Ubuntu check out:
Apache Tomcat is a web server and servlet container that is used to serve Java applications. Tomcat is an open source implementation of the Java Servlet and JavaServer Pages technologies, released by the Apache Software Foundation. This tutorial covers the basic installation and some configuration of Tomcat 7.0.x on Ubuntu 14.04.