You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
388 B

  1. #!/bin/sh
  2. if ! [ -d /var/lib/mysql/mysql ]; then
  3. chown -R mysql:mysql /var/lib/mysql
  4. mysql_install_db --user=mysql --ldata=/var/lib/mysql > /dev/null
  5. fi
  6. ## Support of Ctrl-C: see https://github.com/docker-library/mysql/issues/47
  7. run() {
  8. "$@" &
  9. pid="$!"
  10. trap "kill -SIGQUIT $pid" INT TERM
  11. wait
  12. }
  13. run mysqld --user=mysql --skip-name-resolve --skip-networking=0 "$@"