Structure

This chapter presents the structure of DMK.

Directory structure

Name
Description

${DMK_BASE}

${ORACLE_BASE}/local

${DMK_HOME}

/bin

Contains all binaries & scripts

/etc

Contains configuration files

/docs

Contains the documentation

/lib

Contains all required perl libraries

/templates

Contains Various templates (scrips, configurations, profiles, aso …)

/log

Contains log files

Prompt customization

A well-designed prompt heightens DBA efficiency on all platforms.

One of the most known advantages is the ability to perform SCP operations using the prompt output.

Linux Bash Shell

On Linux the customization takes directly place from the ${DMK_HOME}/etc/dmk.conf file

var::PS1::=::nooption::'${LOGNAME}@${HOSTNAME}:${PWD}/[${MYSQL_SERVERNAME }] '::

To make the prompt shell cleaner and prettier, colour was added:

var::PS1::=::nowarn::'$(if [[ $? == 0 ]]; then printf "\\[\\e[38;2;0;79;156m\\]\\xf0\\x9f\\x98\\x83\\[\\e[0m\\]"; else printf "\\[\\e[38;2;235;125;0m\\]\\xf0\\x9f\\x98\\x9c\\[\\e[0m\\]"; fi)\\[\\e[0m\\]\\[\\e[38;2;0;79;156m\\]${LOGNAME}@${HostName}\\[\\e[0m\\]:\\[\\e[38;2;41;129;173m\\]${PWD}/\\[\\e[38;2;235;125;0m\\][${MYSQL_SERVERNAME}]\\[\\e[0m\\]'::

MySQL Shell

To use dbi services MySQL-Shell prompt you need to copy MySQL-Shell prompt shell configuration file. It will add useful information about the selected instance.

cp ${DMK_HOME}/templates/prompt.json ~/.mysqlsh/

You can also create a symbolic link too:

ln -s ${DMK_HOME}/templates/prompt.json ~/.mysqlsh/prompt.json

Last updated