How to Check if the Datameer Application Database is Running and Accessible

Goal

If you are setting up Datameer for production use, we strongly recommend using MySQL instead of a local HSQL file database. Datameer service depends than on the MySQL database, as it is used for constant writes for workbooks, permission changes, job execution, and scheduling, among other things. For proper function,  a response time should be between ten and twenty milliseconds.

When troubleshooting Datameer service start up and connectivity issues, using the command line interface (CLI) might be required. This article shows some commands which are helpful for debugging.

Learn

Prerequisites

You need to know where the Datameer application database is installed and running, and you need to have appropriate credentials and/or access rights. You should have set up shell aliases already.

Check MySQLd's location

grep -i 'system.property.db' conf/*.properties

Check if MySQLd is up and running

Check if the database service which belongs to Datameer is up and running:

mysqladmin version
mysqladmin ping
mysqladmin status

Check if MySQLd is listening

Verify that the service is listening on the correct port:

echo q | telnet -e q `hostname` 3306
nc -z -w1 `hostname` 3306

Check that MySQL is accessible and test its performance

Now verify that the service is accessible and reacting quickly:

dmdap "show tables"
dmsqlping

Or if aliases are not set up yet:

mysql -hlocalhost -udap -pdap dap -Bse "show tables"
for ((i=1; i<=5; i++)); do time -p mysql -hlocalhost -udap -pdap dap -Bse "START TRANSACTION; INSERT INTO test_entity2 (version) VALUES ('1'); UPDATE test_entity2 SET version = 2 WHERE version = 1; DELETE FROM test_entity2 WHERE version = 2; ROLLBACK;"; echo; sleep 1; done

Further Information

How to measure time of program execution
Custom format for time command

You might have also a look into the MySQL Configuration Utility for the command line option

--login-path=local