#!/bin/bash
# Starts up MariaDB within the container.

# Stop on error
set -e

DATA_DIR=/data
LOG_DIR=/var/log/mysql
chown -R mysql /var/log/mysql
chown -R mysql /data

if [[ -e /firstrun ]]; then
  source /scripts/first_run.sh
else
  source /scripts/normal_run.sh
fi

pre_start_action

post_start_action

# Start MariaDB
echo "Starting MariaDB..."
exec /usr/bin/mysqld_safe

#!/bin/bash
# Starts up MariaDB within the container.

# Stop on error
set -e

DATA_DIR=/data
LOG_DIR=/var/log/mysql
chown -R mysql /var/log/mysql
chown -R mysql /data

if [[ -e /firstrun ]]; then
  source /scripts/first_run.sh
else
  source /scripts/normal_run.sh
fi

pre_start_action

post_start_action

# Start MariaDB
echo "Starting MariaDB..."
exec mysqld

Use mysqld to replace mysqld_safe
Use mysqld to replace mysqld_safe

Change-Id: I942db55bb7b7eab4100c6831be2b4ce8537ba89d
Signed-off-by: Zhiguang Li <bd79e48a9d97f9a17273df9d66f47fe7fb9342b2@gmail.com>
