I was facing the same issue there are some important point's that could be resolve this problem.
1.Put the following at the beginning of hive-site.xml
  <property>
    <name>system:java.io.tmpdir</name>
    <value>/tmp/hive/java</value>
  </property>
  <property>
    <name>system:user.name</name>
    <value>${user.name}</value>
  </property>
  <property>
    <name>javax.jdo.option.ConnectionURL</name>
    <value>jdbc:derby:,databaseName=$HIVE_HOME/metastore_db;create=true</value>
    <description>JDBC connect string for a JDBC metastore </description>
  </property>
this is set relative path in absolute URI and configuring Metastore where the database is stored
2.Remove $HIVE_HOME/metastore_db But Be aware, this will remove your schema completely!
3.Now,You must Initialize Derby database.By default, Hive uses Derby database
$HIVE_HOME/bin/schematool -initSchema -dbType derby
also I suppose that your environment variable has been set correctly ,if not please check them that are looking like below:
export HADOOP_HOME=/usr/local/hadoop 
export PATH=$PATH:$HADOOP_HOME/bin
export PATH=$PATH:$HADOOP_HOME/sbin
export HIVE_HOME=/usr/lib/hive
export PATH=$PATH:$HIVE_HOME/bin
and then run hive command and type show databases;