Stop mysqld_safe Safely

After running “mysqld_safe –skip-grant-tables”  you may notice that the process is still running.
Instead of killing the process by running: kill -9 process ID
you can safely kill mysqld_safe by running the following command:

mysqladmin shutdown

Install TomCat on Ubuntu

FIRST

Download Tomcat
https://tomcat.apache.org/download-70.cgi

SECOND

Extract it to folder on your Ubuntu server

THIRD

Set Up your environment variables (important)
open /etc/environment
copy and paste the following: (Make sure you use the proper paths for your system)
for example, in my system it looks like this: 

CATALINA_HOME=/YCSOFTWARE/servers/apache-tomcat-8.0.33
JRE_HOME=/usr/bin/java
JDK_HOME=/usr/lib/jvm/java-8-openjdk-amd64

run  
"source /etc/environment" 
to make the system recognize the newly added paths

YOU MUST HAVE JAVA INSTALLED.

FOURTH

change the permissions of the ".sh" inside the  apache-tomcat-8.0.33/bin directory
chmod +x *.sh

FIFTH

start tomcat by running
./startup.sh
  or
$CATALINA_HOME/bin/startup.sh