Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
titleDockerfile lines that refer dts_dump_file.sql
...
# Set up MySQL
#ADD dts_dump_file.sql /dts_dump_file.sql
ADDCOPY config_mysql.sh /config_mysql.sh
RUN chmod 755 /config_mysql.sh
RUN /config_mysql.sh; rm config_mysql.sh sh 
#RUN rm dts_dump_file.sql
ADDCOPY my.cnf /etc/mysql/my.cnf
Code Block
languagebash
titleconfig_mysql.sh that refer dts_dump_dile.sql
...
__start_mysql() {
echo "Running the start_mysql function."
mysqladmin -u root password mysqlPassword
#mysql -uroot -pmysqlPassword -e "CREATE SCHEMA IF NOT EXISTS dts DEFAULT CHARACTER SET latin1 COLLATE latin1_bin"
mysql -uroot -pmysqlPassword -e "CREATE DATABASE dts"
mysql -uroot -pmysqlPassword -e "CREATE USER 'dts'@'localhost' IDENTIFIED BY 'dts'"
mysql -uroot -pmysqlPassword -e "GRANT ALL PRIVILEGES ON *.* TO 'dts'@'localhost' WITH GRANT OPTION"
mysql -uroot -pmysqlPassword -e "FLUSH PRIVILEGES"
#mysql -uroot -pmysqlPassword dts < /dts_dump_file.sql
cd ${APELON_HOME}/bin/kb/create; ./kbcreate.sh # run this line if you are not using dts_dump_file.sql
killall mysqld
sleep 10
}

...